Outline for October 27, 2021
Reading
: §7
Due
: Homework 3, due November 8, 2021
Handling exceptions
except
[
except0.py
]
except
exceptcode
[
except1.py
]
else
[
except2.py
]
except
exceptcode
as
msgvar
[
except3.py
]
finally
[
except4.py
]
Exceptions in a function: who handles them? [
except5.py
,
except6.py
]
Using global variables as error flags [
except7.py
]
raise
exceptcode
message
[
except8.py
]
Writing a program to play rock-paper-scissors: top-down design
Problem statement and general algorithm idea
Data representation and program structure [
rps-1.py
]
Figure out who wins [
rps-2.py
]
Get computer choice [
rps-3.py
]
Get user input [
rps-4.py
]
Make it user-friendly [
rps-5.py
]
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email:
[email protected]
ECS 235A, Computer and Information Security
Version of October 27, 2021 at 10:25PM
You can also obtain a PDF version of this.