Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
66
chatboat.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
|
||
|
||
|