Questions and Answers
Problems and Solutions
Quotes help make search much faster. Example: "Practice Makes Perfect"
Saturday, December 1, 2012
Codecademy: Practice Makes Perfect
#sample solution under list slicing exercise
to_21 = range(22)[1::]
odds = to_21[::2]
a = int(len(to_21)/3)
b = int(2*(len(to_21)/3))
middle_third = to_21[a:b:]
print to_21
print odds
print middle_third
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
This is an example of
scrolling text
using Javascript.
Popular Posts
Codeyear: Deal It Out
//sample solution // Card Constructor function Card(num1,num2) { //properties var suit = num1; var number = num2; //methods ...
Codecademy Sample Solution: Codeyear Eliminating Unnecessary HTML
<style> p { margin: 0px; padding-left: 10%; padding-right: 10%; text-align: justify; border-style: dashed;...
Codeschool Cliffs of Value Modulus Sample Solution
Find an expression using two values and the modulus operator that results as 4 Answer: 32%7
Codecademy: Codeyear Conditionals
//sample solution var gender = "female"; if (gender === "female") { result = true; } else { result = false; ...
What is the area of a regular hendecagon (11-sided polygon)?
Type in the length of the side of a hendecagon: meters Compute
How long do undisturbed fingerprints last in a crime scene?
Years
Codecademy: Stocking Out
#sample solution groceries = ["banana", "orange","apple"] stock = {"banana": 6, "appl...
Codecademy > Learn Java > ArrayList: Manipulation Sample Solution
import java.util.ArrayList; public class Temperatures { public static void main(String[] args) { ArrayList<Integer> weeklyTem...
Codecademy: "And"
#sample solution # boolean_1 = 77 < 78 && 77 < 77 boolean_1 = false # boolean_2 = true && 100 >= 100 boolea...
Codefights candles(candlesNumber, makeNew)
//sample solution function candles(candlesNumber, makeNew) { var newCandles=candlesNumber; var newlyBurnedCandles=0; var lef...
No comments:
Post a Comment