From 2c8bcb7cb01dda6b4f184c2a37f0ca3e1d89e29b Mon Sep 17 00:00:00 2001 From: "Salar Kazim (kazims2)" Date: Fri, 20 Nov 2020 07:23:33 -0800 Subject: [PATCH] Create chatboat.py --- chatboat.py | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 chatboat.py diff --git a/chatboat.py b/chatboat.py new file mode 100644 index 0000000..93b68ea --- /dev/null +++ b/chatboat.py @@ -0,0 +1,66 @@ +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() + + +