+ 1
How can I call up functions in if or else?
Let's say my code is Way = input ("Do you want run or stay?") if Way == "Run": Run() else: Way == "Stay" Stay() Run(): Print("Running Fast") Stay(): Print("Staying quite") how can I get the code to run without printing both statements??
2 ответов
+ 5
def Run():
print("running fast")
def Stay():
print("Staying quite")
way=input()
If way=="Run":
Run()
elif way=="Stay":
Stay()
+ 1
Thanks Abhay thank you so much I'll give that a try!!