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 = 'nock bony vare'
b = True
c = 6
d = {-1:c}
e = [-2,c % abs(5)]
ExpressionYour Answer
1. (str(-1 not in d)).split() ['False']
2. e.index(1) 1
3. ((str(-2 not in e)) * 1) 'False'
4. b != False True
5. -1 in d True
6. (str(-2 in e)).split() ['True']
7. -2 not in (e * abs(4)) False
8. d.get(-1,-1) 6
9. e.count(1) 1
10. c / c + c 7.0
Check Answers