I got three functions, named Aufgabe[1,2,3]. I want to make it so that if someone enters in the console "1" Aufgabe1 gets triggered and so on. Is it possible to do?
AufgabenNummer = int(input("Welche Aufgabe willst du öffnen?\n"))
Aufgabe = "Aufgabe" + str(AufgabenNummer)
Aufgabe()
def Aufgabe1():
zahl1 = int(input("Erste Zahl...?\n"))
zahl2 = int(input("Zweite Zahl...?\n"))
print (str(zahl1) + "+" + str(zahl2) + "=" + str(zahl1+zahl2))
def Aufgabe2():
for i in range(0,11):
print(i)
def Aufgabe3():
name = int(input("Hallo wie heißt du?\n"))
print ("Hallo" + str(name))