In this python if else program, we will accept the city name and display its monuments take Pune and Mumbai as cities.
Steps to solve the program
- Take a city as input through the user.
- Using an if-else statement print any 3 monuments of the respective city.
city = input("Enter city name: ").lower()
if city == "pune":
print("Shaniwar vada\nLal mahal\nSinhgad fort")
elif city == "mumbai":
print("Getway of India\nGandhi statue\nAjanta cave")
else:
print("Invalid city")
Output :
Enter city name: pune
Shaniwar vada
Lal mahal
Sinhgad fort