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,-10,-10]
b = 'Jeaz Cant lyo-'
c = {2:1.5,-2:-1.9}
d = -2.0
e = True
ExpressionYour Answer
1. int(d) + 0 -2
2. (-1.9 in c != False) != e True
3. d + 0.9 -1.1
4. d + 0.8 -1.2
5. (str(e)[2]).split('u') ['', '']
6. str(-10 in a) 'True'
7. not not e True
8. (a.index(4) / -3) == d False
9. not (len(c) > d) False
10. c.get(-2,2) -1.9
Check Answers