Questions and Answers
Problems and Solutions
Quotes help make search much faster. Example: "Practice Makes Perfect"
Saturday, December 8, 2012
LearnStreet Python Lesson 7 Exercise 4
#sample solution
def run():
knights = {"Arthur":"king", "Lancelot":"brave", "Galahad":"pure", "Robin":"not-quite-so-brave", "Bedivere":"wise"}
#your code here
del knights["Galahad"]
return knights
#check
print run()
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
Codecademy Sample Solution: Final Push
$VERBOSE = nil # We'll explain this at the end of the lesson. require 'prime' # This is a module. We'll cover these s...
Codeschool Sample Solution Removing the clicked button
$(document).ready(function(){ $("button").on("click", function(){ var message = $("<span>Call 1-555-...
Math Problems: Collatz Function
Problem: The Collatz function is defined as f(n) = 3n+1 for odd values of n and f(n) = n/2 for even values of n. What is the smallest poss...
Codecademy - Animate Your Name: Arrays
//Sample solution to main.js var red = [0, 100, 63]; var orange = [40, 100, 60]; var green = [75, 100, 40]; var blue = [196, 77, 55]; ...
Codecademy > Learn Java > If Statement Sample Solution
public class If { public static void main(String[] args) { if (true) { System.out.println("Access granted."); } ...
LearnStreet Sample Solution Sudoku Solver Project Method 8
function isSolved(sudoku) { // A sudoku will be solved if all its rows, columns and blocks are correct. // Use a combination of t...
Codecademy Learn Statistics With Python Histograms Exercise 4/9
# Sample Solution # Import packages import numpy as np import pandas as pd # Array of days old bread days_old_bread = np.array([0, 8, ...
Codecademy Deezer API 3/6
<!--Sample Solution--> <!DOCTYPE html> <html> <head> <script src="http://cdn-files.deezer.com/js/min/d...
Codefights isMAC48Address(inputString)
//sample solution function isMAC48Address(inputString) { if(inputString.length!=17){ return false; } var regex = /^([0-9A...
#Codeschool CSS Level 1 Sample Solution Floats
//sample solution to style.css aside { width: 120px; float: right; margin: 0px 0px 10px 10px; }
No comments:
Post a Comment