Previous Lecture | Lecture 5 | Next Lecture |
Lecture 5, Mon 04/17
work on lab03, catch up on homeworks
Code from today’s lecture
https://github.com/ucsb-ccs-cs20-s18/LECTURE_04_17
Update on homework
I’ve updated the homework online, and provided places to submit all of the homeworks from h00 through h06 online.
I’ve set a schedule of “suggested” due dates that will get us caught up with the CS8 section. If you want to take their first midterm as an optional take-home exam (on the honor system) to check your understanding of course concepts, this schedule will get you caught up in time to do that.
If you need more time (within reason, i.e. a few days), let me know, but I’d prefer not to extend those due dates much, so that this isn’t hanging out as “unfinished business” for either of us.
imports and the if __name__=='__main__':
thing
Various ways of running Python code
- From a file inside IDLE
- at IDLE
>>>
prompt - From a file outside IDLE using
python3 file.py
orpython file.py
- From a file outside IDLE in a shell, using a
shbang
- Importing one file into another
- Using
python -i file.py
orpython3 -i file.py
lab03–more practice with function definitions and tests
Today, we’ll start by working on lab03, which gives us more practice with writing function definitions and tests.