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 = 9
b = ['Yen CAMP','Taro']
c = 1.3
d = True
e = 'amp PSTN'
ExpressionYour Answer
1. str(('g' in str(a))) 'False'
2. (len(b) > a) != False False
3. int((a // a / a)) 0
4. (b[0:1][0:1:2])[0:1:1] ['Yen CAMP']
5. (str(d)[0:1:4]).find('T') 0
6. a / a 1.0
7. str(c != c) 'False'
8. int(c) 1
9. e[0].isalpha() True
10. str((not 'Yen CAMP' not in b)) 'True'
Check Answers