Bitte helfen Sie mir mit diesem Code, wie ich viele verschiedene Dinge ausprobiert habe und es nicht zur Arbeit bekommen. danke für all deine Hilfe.kann mir jemand mit einem Syntaxfehler auf Python helfen
print(" Greenfly Population Model")
chocies=[]
def option0():
time.sleep(1)
print("GOOD BYE")
time.sleep(1)
# exiting the loop
def option1():
if choies==[]:
print("Set the Generation 0 values!")
else:
print(chocies[:])
def option2():
print("Display the Generation 0 values")
def option3():
print("Run the model")
def option4():
print("Export data")
def option5():
print("Quit")
import time#for option 0
while True:#to keep the program continuous
option=int(input("""
High Scores
0- Exit
1- Show score
2- Add a score
3- Delete a score
4 - Sort the score in ascending order
5- Sort the score in descending order
""")#all different options
s = int(input("from the menu above please pick your choice"))
print("setting the generation 0 values"))
i = int(input("Enter the number of generations you want the model to run for (must be between 5 and 25 inclusive")):
m = int(input("Choose adult survival rate between 0 and 1:"))
o = int(input("Choose Juvenile survival rate between 0 and 1:"))
n = int(input("Choose Senile survival rate between 0 and 1:"))
r = int(input("please enter the initial numbers of juvenile:"))
a = int(input("please enter the initial numbers of adults:"))
i = int(input("please enter the initial numbers of seniles:"))
v = int(input("please enter the initial numbers of the adults:"))
print(s)
print(i)
print(m)
print(o)
print(n)
print(r)
print(a)
print(i)
print(v)
print(" Greenfly Population Model")
option=int(input("""
High Scores
0- Exit
1- Show score
2- Add a score
3- Delete a score
4 - Sort the score in ascending order
5 - Sort the score in descending order
""")#all different options
meine Syntaxfehler ist
s = int(input("from the menu above please pick your choice"))
die s ist, wo meine Syntaxfehler
Seien Sie spezifischer in Ihrer Frage und der Teil des Codes, der nicht funktioniert. –
In der vorherigen Zeile fehlt eine schließende Klammer. –
Welche Python-Version verwenden Sie? –