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 = -1.6
b = {-9:{-1:False,0:False,4:False}}
c = list(range(10))
d = True
e = 'yas PMA'
ExpressionYour Answer
1. str(d).split() ['True']
2. 2 not in c and False False
3. int(a) / 10 -0.1
4. (((e * 1) * 1)) + 'blay' 'yas PMAblay'
5. (str(d).find('e')) - 6 -3
6. str(d) 'True'
7. str((str(d).isalpha())) 'True'
8. str((len(b) <= 5)) 'True'
9. e.replace('a', 'a') 'yas PMA'
10. not not d True
Check Answers