Questions and Answers
Problems and Solutions
Quotes help make search much faster. Example: "Practice Makes Perfect"
Wednesday, November 28, 2012
Codecademy: More With 'for'
#sample solution
start_list = [5, 3, 1, 2, 4]
square_list = []
# Your code here
for number in start_list:
square_list.append(number**2)
square_list.sort()
print square_list
1 comment:
WEB_SURFER 3000
December 21, 2016 at 4:09 PM
Danks!
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
This is an example of
scrolling text
using Javascript.
Popular Posts
LearnStreet Python Lesson 4 Exercise 5
#sample solution def colorful_conditions(): color = "blue" if color == "red": return "firs...
Codecademy Learn Phaser: Keyboard Events 10/12
//Sample Solution const gameState = {} function preload() { this.load.image('codey', 'https://s3.amazonaws.com/codecademy-...
Codecademy Sample Solution: Codeyear Make it Respond
// sample solution to script.js $(document).ready(function() { $("ul.tabs li").click(function(){ var pageID = $(t...
Codecademy: Codeyear Making copies
//sample solution //Here is the original card object var card1 = {"suit":"clubs", "rank": 8}; //Create a ...
Codecademy > Learn Java > Methods: II Sample Solution
class Dog{ int age; public Dog(int dogsAge){ age = dogsAge; } public void bark() { System.out.println("Woof...
Codeyear: Creating an array with recursion
//sample solution // Here is the array we will store results in var multiples = []; function multiplesOf(base, i) { // Base case ...
LearnStreet Mastermind Game Sample Solution Method 3
function checkAnswerWrongPlace(ans, realanswer){ // This method compares two input strings representing a player's guess ("an...
Math Problems: Minimize the fraction
Problem: The task is to minimize the value of the fraction x/f(x) where x is any 3-digit number and f(x) is its digits sum. What is the 3-d...
Codefights isCaseInsensitivePalindrome(inputString)
//sample solution function isCaseInsensitivePalindrome(inputString) { var temp = inputString.toLowerCase(); var tempReversed = te...
What is the area of an N-sided regular polygon?
A regular polygon has sides of equal length. Type in the length of the side of a sided regular polygon: meters Compute
Danks!
ReplyDelete