Questions and Answers
Problems and Solutions
Quotes help make search much faster. Example: "Practice Makes Perfect"
Wednesday, November 28, 2012
Codecademy: Strings in functions
#sample solution
n = "Hello"
#function goes here
def myFun(stringArg):
return str(stringArg) + 'world'
print myFun(n)
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: "Function and Control Flow"
//sample solution def isEven(x): if(x % 2 == 0): return "yep" else: return "nope"
Make a Website: HTML Wrap with a div
<!-- Sample solution to index.html --> <!DOCTYPE html> <html> <body> <div class="nav"> ...
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: "Unless"
#sample solution hungry = false unless hungry puts "I'm writing Ruby programs!" else puts "Time to eat!...
Codecademy: Codeyear Nesting conditional statements
//sample solution var yourName = "Pam"; var gender = "female"; var result; //Line 10 starts an if statement //Ne...
Codeschool Sample Solution Selecting Direct Children
$("#tours > li")
Codecademy: Codeyear Math.floor()
//sample solution var score = Math.floor(7.352); console.log(score);
Codecademy: Structure the Webpage
<!--sample solution--> <html> <head> <title>Week 13 Project</title> </head> ...
Codecademy Sample Solution: Codeyear First But Not Least
/* sample solution to style.css */ /* code exists prior to this point */ dl dd:first-of-type { font-weight: bold; font-size...
DataCamp Booleans in Python Sample Solution
# Test equality test_company = 'apple' print(company_1 == test_company) # Compare revenue_1 and revenue_2 print(revenue_1 ...
No comments:
Post a Comment