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 = ['Doi']
b = -1.2
c = 'PMC aide Dett'
d = {4:False}
e = 2
ExpressionYour Answer
1. int(b) -1
2. 6 not in a + list(range(6,8)) False
3. e / e - 4 -3.0
4. (str(int(b))).split() ['-1']
5. (str(False not in d)).replace('r', 'H') 'THue'
6. e / e - b 2.2
7. b >= e False
8. len(c) 13
9. (str(c.isupper())).split() ['False']
10. len((str(b < b))) 5
Check Answers