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 = -7
b = list(range(3))
c = -1.8
d = 'clan Ervy'
e = {5:a,-2:a,4:a}
ExpressionYour Answer
1. (a / a - c) >= 9 False
2. d.strip('v') 'clan Ervy'
3. (len(b) // -3) + a -8
4. round(c + a - a, 3) -1.8
5. (str(c == -8)).split('F') ['', 'alse']
6. 2 not in b False
7. int(c) -1
8. a / a 1.0
9. b[1:2].index(1) 0
10. round((list(e.items()).index((4, -7))) / a, 1) -0.3
Check Answers