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 = [-0.2]
b = 'deaf skip Anza'
c = {-3:-3,-1:-10}
d = False
e = -1
ExpressionYour Answer
1. d != d or d False
2. a.index(-0.2) 0
3. a[0:1:1] [-0.2]
4. a + ['weys RACE D.F.','iqs',b.find('i')] [-0.2, 'weys RACE D.F.', 'iqs', 7]
5. str(d) 'False'
6. round(len(b) / 3, 3) 4.667
7. a[0:1] + list(range(2,4)) [-0.2, 2, 3]
8. not (-3 in c == True) True
9. (int(e / 3)) != 0.1 True
10. e >= e True
Check Answers