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 > Learn Java > Methods: II Sample Solution
class Dog{ int age; public Dog(int dogsAge){ age = dogsAge; } public void bark() { System.out.println("Woof...
Codecademy Using Documentation 7/8
// Sample Solution using System; namespace DocumentationHunt { class Program { static void Main(string[] args) { ...
LearnStreet Python Lesson 9 Exercise 8
#sample solution def run(bottle): #your code here bottle.drink(250) bottle.refill(150) return bottle.amount_left cl...
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 ...
Codecademy About You Exercises 1 to 4
<!-- sample solutions to Welcome to HTML! --> <h1>Bruce Wayne</h1> <!-- sample solutions to Speak in Paragraphs --> ...
Codecademy: factorial
#sample solution def factorial(x): x = abs(x) #prevents error on negative numbers product = 1 for i in range(x): product = prod...
Codecademy Comparison Operators 3/6
// Sample Solution using System; namespace ComparisonOperators { class Program { static void Main(string[] args) { ...
Codefights isCaseInsensitivePalindrome(inputString)
//sample solution function isCaseInsensitivePalindrome(inputString) { var temp = inputString.toLowerCase(); var tempReversed = te...
Brahmagupta's Formula For Quadrilateral Area
Question: What is the area of a quadrilateral with sides equal to 18, 22, 39, and 41 respectively? Answer: 798 console.log("******...
Codecademy Learn Phaser: Keyboard Events 10/12
//Sample Solution const gameState = {} function preload() { this.load.image('codey', 'https://s3.amazonaws.com/codecademy-...
Danks!
ReplyDelete