Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
SmartBot/chatboat.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
66 lines (51 sloc)
1.53 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | |