p_no = input("Enter your 10 digit phone number: ")
if p_no in "1234567890":
if len(p_no) == 10:
print("ok")
pass
elif len(p_no) < 10:
print()
print("The number of digits in the phone number is less than 10.")
print("Please retry")
elif len(p_no) > 10:
print()
print("The number of digits in the phone number is more than 10.")
print("Please retry")
else:
print()
print("Please retry using numbers (0-9)")
samedi 31 juillet 2021
why my code does not show the desired output when p_no > 10
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire