Computer Science, asked by Sipundash1400, 1 month ago

write a program to input any 5 years and population record of a city and print it on the screen in Python

Answers

Answered by rrmohan74
0

Answer:

hope you got the best answer.

Attachments:
Answered by reddypruthik
2

Answer:

city=dict( )

  n=5 

i=l while i<=n: 

a=raw_input(” enter city name”)  b=raw_input(“enter population”) 

city[a] =b 

i=i+l print  city 

Output : enter city name Chennai 

enter population 3400000 

enter city name Mumbai 

enter population 8900000 

enter city name Bangalore

  enter population 98700 

enter city name Calicut 

enter population 560000 

enter city name Hyderabad 

enter population 900000

{‘Bangalore’: ‘ 98700’/ Hyderabad’: ‘ 900000’, ‘ Chennai’: ‘ 3400000’, ‘ Mumbai’: ‘ 8900000’, ‘ Calicut’: ‘ 560000’}

Similar questions