I'm working on my first program that is supposed to simulate launch procedures, but my if statement isn't being picked up, which is supposed to end the program, and instead it immediately proceeds to the next part of the code.
Any help will be greatly appreciated as this is the last problem I can find in my program. Sorry for the non-pythonic language
while mission <= 0 or mission > 1000:
try:
mission = int(input("Enter a VALID distance in metres: "))
except ValueError:
print("Please enter a valid distance E.g 100: ")
if mission > 0 or mission < 100:
print("ERROR, ERROR")
if mission >= 5000:
print("The viewing stands are situated far enough.")
while people == 0 or people == "":
print("We need to know how many people are spectating.")
try:
people = int(input("How many people are there watching?: "))
except ValueError:
print("Please enter a valid number: ")
Aucun commentaire:
Enregistrer un commentaire