I'm trying to make a greenfly population model, but I don't know how to make it run. I have got a menu and you can enter the values, but I don't know how to make the actual program run. Does anyone know how?
This is what I have so far:
loop = 1
choice = 1
while loop ==1:
#print what options you have
print("AQA population model")
print("Your options are:")
print(" ")
print("1) Set the generation 0 values ")
print("2) Display the generation 0 values ")
print("3) Run the model ")
print("4) Export the data ")
print("5 Quit ")
print(" ")
choice = input("Choose your option: ")
if choice == "1":
choice = print("Set the 0 values ")
#allows the user to set generation 0 values
population_juveniles = int(input("\nEnter the number of juvenile greenflies "))
#allows the user to set the number of juveniles
population_adults = int(input("\nEnter the number of adult greenflies "))
population_seniles = int(input("\nEnter the number of senile greenflies "))
survival_rate_juveniles = float(input("\nEnter the survival rate of juvenile greenflies "))
survival_rate_adults = float(input("\nEnter the survival rate of adult greenflies "))
survival_rate_seniles = float(input("\nEnter the survival rate of senile greenflies "))
birth_rate = float(input("\nEnter the birth rate of greenflies "))
generation_to_model = int(input("\nEnter the number of generations to model "))
total = population_juveniles + population_adults + population_seniles
elif choice == "2":
choice = print("Display the generation 0 values ")
print("Number of Juveniles: " + str(population_juveniles))
print("Number of Adults: " + str(population_adults))
print("Number of Seniles: " + str(population_seniles))
print("Total : " + str(total))
print("Juvenile survival rate: " + str(survival_rate_juveniles))
print("Adult survival rate: " + str(survival_rate_adults))
print("Senile survival rate: " + str(survival_rate_seniles))
print("Birth Rate: " + str(birth_rate))
print("Generations: " + str(generation_to_model))
elif choice == "3":
choice = input("Run the model ")
elif choice == "4":
choice = input("Export the data ")
elif choice == "5":
choice = input("Quit ")
loop = 0