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
Codecademy: "Function and Control Flow"
//sample solution def isEven(x): if(x % 2 == 0): return "yep" else: return "nope"
What hotkeys can you use in a Python shell to repeat the previous command you typed?
Answer: Alt - p p stands for previous. If you keep pressing Alt - p, you will continue cycling back through commands you typed before. I...
Codecademy Sample Solution: Adding the Parse SDK to your app
<html> <head> <!-- Add the Parse SDK here! --> <script src="http://www.parsecdn.com/js/par...
Codecademy: "Unless"
#sample solution hungry = false unless hungry puts "I'm writing Ruby programs!" else puts "Time to eat!...
Codeschool Sample Solution Selecting Direct Children
$("#tours > li")
Codecademy Sample Solution: Conditional Assignment
favorite_animal ||= "dog" favorite_animal ||= "cat"
Codecademy: Codeyear Nesting conditional statements
//sample solution var yourName = "Pam"; var gender = "female"; var result; //Line 10 starts an if statement //Ne...
Codecademy Sample Solution: Anonymous functions
setTimeout(function() { console.log("The callback fired"); }, 500);
Codecademy Sample Solution: Codeyear Tweaking Margins and Paddings
/* sample solution to style.css */ /* Layout */ body { font:normal 12px/1.6em Arial, Helvetica, sans-serif; color:#2a3845; back...
LearnStreet Sample Solution to Lesson 9 Exercise 3
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] # your code here numbers.collect! do |x| if x % 2...
Danks!
ReplyDelete