-
Notifications
You must be signed in to change notification settings - Fork 0
/
myfile.py
42 lines (35 loc) · 1.07 KB
/
myfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
##############################################################################
#### Modify the variables so that all of the statements evaluate to True. ####
##############################################################################
var1 = 1
var6 = 24.33
var2 = ("python")
var3 = [1, 2, 3, 4, 5]
var4 = ("hi", "bye", "Hello, Python!")
var5 = {"happy": 7, "egg": "salad", "tuna": "fish"}
###############################################
#### Don't edit anything below this comment ###
###############################################
# integers
print(type(var1) is int)
print(type(var6) is float)
print(var1 < 35)
print(var1 <= var6)
# strings
print(type(var2) is str)
print(var2[5] == 'n' and var2[0] == "p")
# lists
print(type(var3) is list)
print(len(var3) == 5)
# tuples
print(type(var4) is tuple)
print(var4[2] == "Hello, Python!")
print("This line")
# dictionaries
print(type(var5) is dict)
print("happy" in var5)
print(7 in var5.values())
print(var5.get("egg") == "salad")
print(len(var5) == 3)
var5["tuna"] = "fish"
print(len(var5) == 3)