The readings for Tuesday, September 06 are:
Automate the Boring Stuff with Python
Once you have completed these readings, please answer the following questions:
Given a = False
and b = True
, what is the result of the following
expressions?
A. a
B. b
C. a and b
D. a or b
E. not a
F. not b
G. (not a and b) or (a and not b)
H. not (a and b)
Given the following code:
if n % 3 == 0:
print 'Fizz'
elif n % 5 == 0:
print 'Buzz'
else:
print n
What is the result of executing the code above when n
is each of the
following values:
1
3
5
6
10
15
Describe how you would check if a number n
is between 0
and 9
(inclusive).
If you have any questions, comments, or concerns regarding the course, please provide your feedback here.
To submit your response, please edit the reading02/README.md file in your GitLab repository.