Skip to content
Permalink
Browse files
Update chatbot.py
  • Loading branch information
fiuzadacua committed Nov 20, 2020
1 parent b1f9cc5 commit 666e11ca70c2433ee3610de385276ad45b75f299
Showing 1 changed file with 62 additions and 0 deletions.
@@ -1 +1,63 @@
def main ():
budget=0
brand=0
battery=0
screen=0

budget = MyPrice(budget)
brand = Mybrand(brand)
battery = Mybattery(battery)
screen = Myscreen(screen)


def MyPrice(budget):
ValidMoney = False
while ValidMoney == False :
money=int(input("How much is your budget? --"))
if money<230:
print ("your budget is too low")
else:
budget = money
return budget


def Mybrand(brand):
ValidBrand= False
while ValidBrand == False:
user_Brand=str(input("what brand do you perfer?--Google-- Apple--Samsung--One Plus-- Xaomi? "))
user_Brand = user_Brand.lower()
ValidBrand= False
if user_Brand== "google" or user_Brand== "apple" or user_Brand== "one plus" or user_Brand== "xaomi" or user_Brand=="samsung":
brand = user_Brand
return brand
else:
print("try again")




def Mybattery(battery):
validBattery = False
while validBattery == False:
user_Battery=int(input("how long are you use your device?--"))
if user_Battery>24:
print ("you must need a device with more than 3500 Mah capacity")
battery = user_Battery
return battery
elif user_Battery<24:
print("you can use a device with less than 3500 Mah of capacity")
battery = user_Battery
return battery
else:
print("try again")

def Myscreen(screen):
user_Size= int(input("what is your ideal screen size?--"))
user_Size == 4
if user_Size<4:
print("this size is good for you")
else:
print("good chioce")


main()

0 comments on commit 666e11c

Please sign in to comment.