def D_or_P():
pass
while True:
try:
d_or_p =input("Will this order Be Delivery? (yes or no): ").lower()
if d_or_p == 'yes':
d_or_p= 3
break
elif d_or_p == 'no':
d_or_p= 0
break
except ValueError:
pass
print ("Please Enter a Yes or No")
if d_or_p in (range (3,4)):
PH = int(input("whats your phone number: "))
A = input("what is your adress: ")
i want to try to get PH to make sure a int is enterd but i need to to be in the if stament so only is d_or_p = yes it is activated and also is it possabal to get A to loop if less then 2 letters are entred. thax

New Topic/Question
Reply



MultiQuote





|