Week 1 Extra Resources
Week 1The "Extra Resources" section for each week is a set of useful links and references that accompany the material for each week. You'll also find some "more practice" and "challenge" material in here. These are optional, but recommended if you want to get more facetime with the material. If you want feedback on your solutions to any of these problems, submit by email.
Resources
New to Python? Start here:
- Codecademy: Basic Python Syntax
- Codecademy: Strings
- Codecademy: Files
- Hackbright: Conditionals & Variables
- Hackbright: Lists
- Wikibooks: Variables and Strings
- Wikibooks: Files
- Command Line Basics
- Learn Python the Hard Way: Numbers and Math
- Learning Python: Scopes
- Khan Academy video on lists
- Codecademy: lists
- Control Flow: If and For
- Codecademy: Loops
More Practice
Both of these point to some resources you can work through first, so try reading through the exercise first and going to the extra resources if you need them.
Challenges
Write a script to calculate the number of MUNI rides you can take, given your Clipper balance as input.
Figure out (or remember) how to make and remove directories on the command line.
Work through The Way of the Program.
- Review questions:
- What is a programming language?
- What is an algorithm?
- What is a function?
- What is debugging?
- What's the difference between a syntax error and a semantic error?
More superheroes!
Extend the superhero name generator: can you create your own generator for something different?
Write ten random superhero names to a file called 'mysuperheroes.txt', making sure each name is on a new line. (Hint:
\n
is the special newline character.)Extend this to make sure you don't use any prefix or suffix more than once.