Skip to content
HELP PLEASE : how do I use the return function?
Profile icon
ElvisNguyen

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!!

You are viewing a single comment. View All
Profile icon
ash15khng

You could use a while True loop in front of the try except clause, then add a break in the try part.

while True: try: # asking the user to input the length of side A and print it out A = int(input("Please Enter A Numerical Length For the Triangle: A = ")) break except ValueError:# if the input is none numerical, let the user know and ask the user to enter a numberical print("That is not an Numerical, Please ONLY ENTER NUMERICAL")