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 = {4:'sar Dyan Mora',1:'dal TQC jagg',-7:'NDE CCP',2:'Rog'}
b = -2.3
c = -6
d = 'cate INRI'
e = list(range(9))
ExpressionYour Answer
1. (str(c < b)).isalpha() True
2. int(b - 1.3) -3
3. e[3:6:6][0:1] [3]
4. b + 0 -2.3
5. int(b + b) -4
6. (str(b < c)) + 'HFE' 'FalseHFE'
7. (str(c // c)).split('1') ['', '']
8. str((not b >= c)) 'False'
9. not (2 in a == True) True
10. (len(d) / c) > 0.3 False
Check Answers