COSC 101 expression practice (beta!)

Report any problems to jsommers@colgate.edu

Generate expressions using these types:






# Assume the following assignments have been made in Python
a = -4
b = False
c = -1.6
d = {-8:b,10:b,-5:b,4:False}
e = list(range(5,8,3))
ExpressionYour Answer
1. str(b) 'False'
2. False not in d and False False
3. a // a / a -0.25
4. str(b) 'False'
5. len(d) 4
6. b or False False
7. (list(d.values())[0:2:2]) + [list(range(4)),'Feld mobs','Edea','Alli'] [False, [0, 1, 2, 3], 'Feld mobs', 'Edea', 'Alli']
8. a <= -4 True
9. c + -0.3 + c -3.5
10. str(b) 'False'
Check Answers