Spaces:
Runtime error
Runtime error
File size: 574 Bytes
17e77ea |
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 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 21 21:44:47 2022
@author: syed
"""
import sys
loc_dict = {"east":"This is east", "west": "This is west", "north":"This is north",
"south":"This is south","up":"This is up","down":"This is down",
"look":"This is the description", "quit": "To end the game"}
user_input = input("Enter your desired location")
def findLocation(input, loc_dict):
if input == "quit":
sys.exit(f"End of the game with code{input}!")
else:
print(loc_dict[input])
|