#-*- coding: cp1252 -*- def start () print ("Willkommen im Python-Rechner. Wie willst du Rechnen?") answer = input("Schreibe deine Rechen art ein: Plu,sMinus,Mal oder Geteilt:" () if answer == "Plus" def Plus(): a = int(input("Gibt deine erste Zahl ein:")) b = int (input("Gibt jetzt deine zweite Zahl ein:")) c = a + b print c start() Plus() elif answer == "Minus" def Minus() a = int(input("Gibt deine erste Zahl ein:")) b = int (input("Gibt jetzt deine zweite Zahl ein:")) c = a + b print c start() Minus() elif answer =="Mal" def Mal() a = int(input("Gibt deine erste Zahl ein:")) b = int (input("Gibt jetzt deine zweite Zahl ein:")) c = a + b print c start() Mal() elif answer == "Geteilt" def Geteilt() a = int(input("Gibt deine erste Zahl ein:")) b = int (input("Gibt jetzt deine zweite Zahl ein:")) c = a + b print c start() Geteilt() else print ("Das war leider Falsch. Versuche es erneut.") start() start()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question