So basically want to stop a script if an if statement is not met, the statement is this:abbrevationabbrevation
if x > 40 : print ("Please enter a number between 2 and 40")
If the user enters 41 for example, I don't want the program to continue running, but at the moment it does.
sys.exit()sys.exit()should always be inside a condition otherwise rest of the code would automatically become unreachable