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 = -3
b = {-5:True}
c = list(range(4,8))
d = 'peep sag'
e = 0.8
ExpressionYour Answer
1. int(a / a) 1
2. not a > a True
3. -e + a -3.8
4. str(a).split() ['-3']
5. ((d.strip('g') * 3)).upper() 'PEEP SAPEEP SAPEEP SA'
6. len(d) 8
7. d.islower() True
8. d.find('a') 6
9. len(b) 1
10. c.index(4) / -4 -0.0
Check Answers