-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathten.py
More file actions
64 lines (51 loc) · 1.02 KB
/
ten.py
File metadata and controls
64 lines (51 loc) · 1.02 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
numbers = {}
numbers["one"] = 1
numbers["two"] = 2
cars = {
'mazda': "red",
"toyota": "blue",
"benz": "black"
}
phonebook = {
"barney": 123456,
"fred": 554533,
"carry": 532903444,
"penny": 53434
}
gps = {
"Home": '14.75 23.43',
'Car': '24.33 05.43',
'Dog': '43.52 45.23'
}
birthdays = {
"Ted": '2019/02/20',
'Shantelle': '2081/12/32'
}
reservations = {
"Ken": '10pm',
"Ben": "2pm",
"Urella": "3pm"
}
pets = {
"dog": "bobby",
"cat": "Bella",
"horse": "White Thunder",
}
print(numbers)
print(cars)
print(phonebook)
for object, location in gps.items():
print(object + " is located at " + location + "")
for name, bd in birthdays.items():
print("%s birthday is on the date %s" %(name, bd))
print(reservations)
del reservations["Ken"]
print(reservations)
print(pets)
horseName = pets.pop("horse")
print(horseName)
print(pets)
if "dog" in pets:
print("I have a dog named " + pets["dog"])
if "horse" not in pets:
print("i no longer have a horse")