Skip to content

Commit

Permalink
Update userpref.py
Browse files Browse the repository at this point in the history
Implemented new functionality for travelling
  • Loading branch information
cherylchen2 committed Feb 16, 2020
1 parent bf5d37f commit 5de49d5
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion userpref.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,34 @@ class User:
shopping: Dict
in_home_country: bool

def __init__(self, food, arts, entertainment, shopping):
def __init__(self, food, arts, entertainment, shopping, in_home_country):
self.food = food
self.arts = arts
self.entertainment = entertainment
self.shopping = shopping
self.in_home_country = in_home_country

def otherCountryPref(self, food, arts, entertainment, shopping):
if food != "":
foodList = food.split()
for f in foodList:
self.food[f] = ['T',0]
if arts != "":
artsList = arts.split()
for f in artsList:
self.arts[f] = ['T',0]
if entertainment != "":
entertainmentList = entertainment.split()
for f in entertainmentList:
self.entertainment[f] = ['T',0]
if shopping != "":
shopList = shopping.split()
for f in shopList:
self.shopping[f] = ['T',0]
print(self.food)
print(self.arts)
print(self.entertainment)
print(self.shopping)



0 comments on commit 5de49d5

Please sign in to comment.