Oct 13: Writing Multiple Modules
Learning Objectives
After today's class, you should be able to:
- Explain the purpose of the idiom
if __name__ == "__main__"
. - Describe several built-in modules, such as
random
andturtle
. - Summarize course and school policies about academic honesty.
Announcements¶
- Mid-Eval Canvas survey – TODAY
- Ch 8 on zyBooks – due Tuesday
- Only 5 sections this week!
- PA 1 Poker Dice (modules + testing)
- Don't put off until after fall break
- Part A due Tuesday 10/24 (30 pts)
- Part B due Tuesday 10/31 (70 pts)
POGIL Activity¶
- Multiple Modules
/ JMU Honor Code
- If you are absent today, complete this activity at home
- Bring your completed activity to class or office hours
Example Code¶
Model 1
move.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
stop.py | |
---|---|
1 2 3 4 |
|
Model 2
draw.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|