Report any problems to
# Assume the following assignments have been made in Python
a = False
b = 2.4
c = [5,5,-7]
d = {4:a,2:True,8:a}
e = 'tod'
| Expression | Your Answer | |
|---|---|---|
1. (not a == a) or a
| False
| |
2. int((int(b) / -10))
| 0
| |
3. (str(a).upper()).replace('F', 'v')
| 'vALSE'
| |
4. list(d.values()) + [b - -2,b <= 0.4,1.2,-1.3]
| [False, True, False, 4.4, False, 1.2, -1.3]
| |
5. d.get(8,4)
| False
| |
6. str(a).find('l')
| 2
| |
7. str((not 5 not in c))
| 'True'
| |
8. (e.replace('o', 'D') + 'wave').split()
| ['tDdwave']
| |
9. (5 not in c[0:1:1]) or a
| False
| |
10. list(d.items())
| [(4, False), (2, True), (8, False)]
|