Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
Implemented one new functinoality
  • Loading branch information
cherylchen2 committed Feb 16, 2020
1 parent 5de49d5 commit 4dd5cfa
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,48 @@

if __name__ == "__main__":
#Get user input
user = userpref.User({"Chinese":4,"Korean": 4, "Quiet": 3, "Mediterranean": 1},{"Fine arts":3,"Theatre":2},{"Movie":8,"KTV":2},{"Althetic":3,"Formal":2})
userSimInput = input("Simulate in home country or outside of home country?")
if userSimInput == "In":
user = userpref.User({"Chinese":4,"Korean": 4, "Quiet": 3, "Mediterranean": 1},{"Fine arts":3,"Theatre":2},{"Movie":8,"KTV":2},{"Althetic":3,"Formal":2}, True)
else:
user = userpref.User({"Chinese":4,"Korean": 4, "Quiet": 3, "Mediterranean": 1},{"Fine arts":3,"Theatre":2},{"Movie":8,"KTV":2},{"Althetic":3,"Formal":2}, False)
i = 0
listCategory = {"Restaurant":0,"Arts & Culture":0,"Entertainment":0,"Shopping":0}

if (user.in_home_country == False):
done = 0
newFoodPref = ""
newArtPref = ""
newEntInput = ""
newShopInput = ""
while done != 1:
print("What do you want to try in this new country?\nCategories to add new prefereces for:\n0: Restaurant\n1: Arts & Culture\n2: Entertainment\n3: Shopping\nSeparated by commas. -1 to exit\n")
userQuery = int(input())
if (userQuery == 0):
print("What do you want to try new in food?")
newFoodPref = input()
if (userQuery == 1):
listCategory["Arts & Culture"] = 1
print("What do you want to try new in Arts & Culture?")
newArtPref = input()
if (userQuery == 2):
listCategory["Entertainment"] = 1
print("What do you want to try new in the Entertainment?")
newEntInput = input()
if (userQuery == 3):
listCategory["Shopping"] = 1
print("What do you want to try new in the Shopping")
newShopInput = input()
if (userQuery == -1):
break
user.otherCountryPref(newFoodPref, newArtPref, newEntInput, newShopInput)





while i == 0:
print("Select preferences:\n0: Restaurant\n1: Arts & Culture\n2: Entertainment\n3: Shopping\n")
print("Select categories:\n0: Restaurant\n1: Arts & Culture\n2: Entertainment\n3: Shopping\n")
userInput = int(input())
if (userInput == 0):
listCategory["Restaurant"] = 1
Expand Down

0 comments on commit 4dd5cfa

Please sign in to comment.