-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
33 lines (28 loc) · 1.1 KB
/
main.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
cities = {"oslo" :
{
"country" : "Norway",
"population" : "681,067",
"fact" : "Oslo residents are Norway's healthiest."
},
"new_york" :
{
"country" : "The USA",
"population" : "18,804,000",
"fact" : "A little over 8 million people live in New York City. \nThat means 1 in every 38 people in the United States call the city home.",
},
"sydney" :
{
"country" : "Australia",
"population" : "4,925,987",
"fact" : "More than half of Australia's top 100 companies have their headquarters in Sydney.",
},
}
for key, value in cities.items():
print(f"information about {key.title()}:")
population = value['population']
country = value['country']
fact = value['fact']
print(f"{key.title()} is located in {country}")
print(f"The population of {key.title()} is: {population}")
print(f"One fact about {key.title()} is that: {fact}")
print("\n")