Python Day 1 Labs
Day 1 Labs
To access these labs, click on their github links, and then fork and clone their repositories.
A Subway Story [Functions, Math Operations, Loops] Public Transit is always an adventure. This lab contains the frame of a variety of functions. Your job is to complete them so that when they are called at the bottom of the subway_functions.py file, you’re ready to share your subway story.
WALL-E [String Methods, Functions, While and For Loops, Conditional Statements]
WALL-E’s microphone is broken and the only way he can hear you is if you shout at him!! Write a speak_to_walle
method that accepts one argument: what you want to say to him. Whatever you say (type) to WALL-E, he should respond with Dirrrrr-ect-tivvve?
, unless you shout it (type in all capitals). If you shout, he can hear you and yells back, EEEEEEEEEEEVAAAAAAAAAA!
.
STRETCH: Cartoon Collections [Functions, Loops, Enumerate, String Methods, List Methods] There are three functions to complete in this lab:
- Dwarf Roll Call with Snow White’s vertically-challenged friends
- Summon Captain Planet and Long Planeteer Calls with the environmentally conscious hero
STRETCH: Mario Pyramids [Functions, Loops, Console Input, Conditional Statements] Toward the beginning of World 1-1 in Nintendo’s Super Mario Brothers, Mario must hop over two “half-pyramids” of blocks as he heads toward a flag pole. Below is a screenshot. Your mission is to recreate these blocks using python. You will add parameters so that the user can specify the height of each pyramid and eventually chain pyramids together.