This Gist was automatically created by Carbide, a free online programming environment.
Suggested Readings
- “American schools are teaching our kids how to code all wrong”
- “Code and the Quest for Inclusive Software”
- “Code Literacy: A 21st-Century Requirement”
- “Coding While Black: Hacking The Future Of The Tech Industry”
- “How to Get Girls Into Coding”
- “Is Coding the New Literacy?”
- “Learnable Programming”
- [“Now Would Be a Great Time To Get Into Crea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| list_dictionaries = { | |
| 'monday':['grocery shopping'], | |
| 'i': [1, 3, 4], | |
| 'am': [1, 2, 3, 4] | |
| } | |
| print list_dictionaries | |
| # What type of data is list_dictionaries? | |
| # What type of data are list_dictionaries keys? | |
| # What type of data are list_dictionaries values?? | |
| # Update the value of 'am' to [1, 2, 3, 4, 5] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Setting PATH for Python 2.7 | |
| # The orginal version is saved in .bash_profile.pysave | |
| PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" | |
| export PATH | |
| # Get the Git branch | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For each example below, predict what will be printed. Then, run the code and confirm your prediction. | |
| a = 0 | |
| while a< 100: | |
| print a | |
| """ | |
| Prediction: | |
| Observation: | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Khan Academy CS Musings | |
| [Guide](https://www.khanacademy.org/coach-res/reference-for-coaches/teaching-computing/a/programming-curriculum-overview) is **fantastic**. Good writing. | |
| When I click "Intro" is there any reason to jump me to a list, instead of straight into the work? There's a lot of words between me and coding. | |
| Copy is nice and big, interstitials to code > Codecademy | |
| What's the rationale for showing questions before i might actually have one? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| numbers = [1,2,3] | |
| for x in numbers: | |
| print "We're on number %d" % (x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grades = raw_input("What are your grades?").split() # Start out just like our old GPA calculator. | |
| float_grades=[] # Make an empty list. We'll need this once we convert all of our grades to floats. | |
| for inputs in grades: # This for loop will go through every grade... | |
| num_grade = float(inputs) # float() the value of each grade... | |
| float_grades.append(num_grade) # and append that float value to our empty list | |
| # I've made a new variable. You don't NEED to do this, but it makes the last line look cleaner | |
| average = sum(float_grades)/len(float_grades) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print "The _______ of Romeo & _______" | |
| print ".............................." | |
| def madLibs(): | |
| plural_noun = raw_input("plural noun".upper()).upper() | |
| plural_noun1 = raw_input("Another plural noun".upper()).upper() | |
| place = raw_input("place".upper()).upper() | |
| noun = raw_input("noun".upper()).upper() | |
| noun1 = raw_input("Another noun".upper()).upper() | |
| adjective = raw_input("adjective".upper()).upper() |
NewerOlder