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:False,-9:True}
b = False
c = [-2.0,'RDTE Gut Birk',b or False,list(range(4,11))]
d = 0
e = 'poa Bale Fox'
ExpressionYour Answer
1. c[0:1:1].count(-2.0) 1
2. d / 7 >= -1.5 True
3. str(d) + 'rsum' '0rsum'
4. list(a.items()) [(-4, False), (-9, True)]
5. b and True False
6. (d / 7 - 0.8) + -5 -5.8
7. len(e.split('l')) 2
8. str(d) '0'
9. str(b and True) 'False'
10. c[0:3:3] [-2.0]
Check Answers