@@ -21,7 +21,7 @@ def main():
21
21
"country" : {
22
22
"size" : {
23
23
"area" : 1_000_000 ,
24
- "units" : "miles " ,
24
+ "units" : "miles" ,
25
25
}
26
26
}
27
27
}
@@ -34,24 +34,28 @@ def main():
34
34
35
35
print (func1 (data , b , c , d , e ))
36
36
37
- # d = "other "
37
+ # d = "bigness "
38
38
# print(func1(data, b, c, d, e))
39
39
40
40
t1 = Thing ("Bob" , 70 , 24 )
41
41
t2 = Thing ("Sarah" , 65 , 32 )
42
42
t3 = Thing ("Jake" , 72 , 20 )
43
43
44
- total = func2 (t1 , t2 , t3 )
45
- print (f'The total weight is { total :, } . ' )
44
+ total_weight = func2 (t1 , t2 , t3 )
45
+ print (f'The total weight is { total_weight } kg ' )
46
46
47
47
# t2 = None
48
- # total = func2(t1, t2, t3)
49
- # print(f'The total weight is {total:,}. ')
48
+ # total_weight = func2(t1, t2, t3)
49
+ # print(f'The total weight is {total_weight} kg ')
50
50
51
- # print(t1.weight + t4.weight)
52
- # NameError: name 't4' is not defined. Did you mean: 't1'?
51
+ print (func3 (1 , 2 , 3 , 4 ))
52
+ # print(func3(1, 2, "3", 4))
53
+
54
+ sarah = t2
55
+ bob = t1
56
+
57
+ # print(f"The weight of bob and sarah is {bob.weight} & {sara.weight}")
53
58
54
- # print(f'Sum is {func3(1, 2, "3", 4)}')
55
59
56
60
57
61
if __name__ == '__main__' :
0 commit comments