Hello guys I wondered If you could please help me with my python code for my school, I basically do not understand how to end the code when the user inputs an answer that does not fit the criteria for it to end, and do not know how to give out a retype message when he/she writes something like just pressing enter enter
operation = int(input("how long has your company been operating for?: "))
if operation > 5:
print("Wow your company has gone on for quite some time now, huh?")
else:
print("Sorry your company does not fit into our criteria")
Such as here, if the user inputs 4 the program says "sorry your company doesn't meet the requirements" but dosnt end the code it juts carries on to the next program, and if the user presses enter or types in letters it will give me back a trace back error when I want it to just repeat the question and say "please type an appropriate answer"
Employees = int(input("How many employees are currently working in your company?"))
if Employees > 1000:
print("Great to see your company is growing")
else:
print("Sorry you must have at least 1000 employees if you want to be our supplier")
This also has the same problem as the last program it carries on when it shouldn't such as number under (1000) and dosnt accept random input by just saying trace back error instead of retyping message and saying "please give appropriate input"