can someone please help me out. How do i return it back to " A = int(input("Please Enter A Numerical Length For the Triangle: A = "))" . I have no clues on how to do it. Could some expert help me out please!!
name = input("What is your name? \n") #asking the user their name
print("Welcome, " + name + "!") #print the message with customer name
print("Let plays the triangle guesing game") #welcome messages
is_number = False
while is_number == False:
A = input("Please Enter A Numerical Length For the Triangle: A = ")
for i in A:
if i in ["0","1","2","3","4","5","6","7","8","9"]:
is_number = True
else:
print("That is not an Numerical, Please ONLY ENTER NUMERICAL")
break
I kept the input in a loop and checked if it was an int in the loop if so then it breaks the loop.
HELP PLEASE : how do I use the return function?
can someone please help me out. How do i return it back to " A = int(input("Please Enter A Numerical Length For the Triangle: A = "))" . I have no clues on how to do it. Could some expert help me out please!!
I did it using the strip of code.
name = input("What is your name? \n") #asking the user their name
print("Welcome, " + name + "!") #print the message with customer name
print("Let plays the triangle guesing game") #welcome messages
is_number = False
while is_number == False:
A = input("Please Enter A Numerical Length For the Triangle: A = ")
for i in A:
if i in ["0","1","2","3","4","5","6","7","8","9"]:
is_number = True
I kept the input in a loop and checked if it was an int in the loop if so then it breaks the loop.