0
Find error
rooms = {1: 'Foyer',2:'Conference room'} room = input("enter the room number :") if not room in rooms: print("Room does not exist") else: print("the room name is " + rooms[room])
2 Respuestas
+ 1
You mapped integers to Foyer2 and confrence classroom, make it
rooms = {'1': 'Foyer',
'2': 'Confrence room'}
Its good practice NOT to map integers to others things though. it gets confusing
+ 1
room = int(input("enter the room number :"))