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 = -10
b = [[a / a,a / -9],[4,list(range(7)),-2],[False],list(range(7))]
c = 1.4
d = {-10:'gor slur',-2:'fmt Toh'}
e = 'DPC cen-'
ExpressionYour Answer
1. c >= 2 False
2. list(d.values()) ['gor slur', 'fmt Toh']
3. c - -10 11.4
4. b.count([1.0, 1.1111111111111112]) 1
5. (str(int(c))).strip() '1'
6. [4, [0, 1, 2, 3, 4, 5, 6], -2] not in b False
7. str('k' not in e) 'True'
8. str((c > a != False)) 'True'
9. str((c > c or False)) 'False'
10. d.get(-2,-2) 'fmt Toh'
Check Answers