Q&A
- Cloud 9 peeps: https://community.c9.io/t/writing-a-python-app/1609
- The
#!/usr/bin/python
tells the Run button what to use to run the file. You should pick/usr/bin/python3
instead so you’re using Python 3. Here’s the file I ran:
#!/usr/bin/python3
print("Hello World!")
- OR you can also save your file and type
python3 filename.py
in a terminal (you may need tocd
if it’s in a directory). This is what I do.
Analysts
Check this example code for the kind of text-based interface I’m looking for:
You can use functions to respond to the options, or you could store the choice in a variable that’s passed to one function that changes its behavior based on logic you write.
You’ll need to get your dataset inside the function, either as a parameter or as a global.
Turtlers
Remember my video? There’s a chapter on using dictionaries in Turtle!
There’s also an example game with levels (but that may not apply to anyone except Jay).
Permanent Groups
TBD, in case anyone switched.
Group Work today:
A revised project plan. See in-class exercise.