Hallo,
mein Taschenrechner(mit Tkinter) funktioniert nicht(wegen der Zahleneingabe mit Entry), und ich weiß nicht wie ich dies lösen kann. Könnte mir jemand helfen?
Danke im Voraus
Mein Programm:
from tkinter import *
import tkinter.ttk as ttk
root=Tk()
root.title("Taschenrechner")
root.geometry("4000x3000")
textlabel1 = Label(root, text="", font="Segoe 30")
textlabel1.place(x=580, y=30)
textlabel1.config(text="Taschenrechner")
textlabel2 = Label(root, text="", font="Segoe 30")
textlabel2.place(x=70, y=100)
textlabel2.config(text="Zahl 1:")
textlabel3 = Label(root, text="", font="Segoe 30")
textlabel3.place(x=70, y=200)
textlabel3.config(text="Zahl 2:")
textlabel4 = Label(root, text="", font="Segoe 30")
textlabel4.place(x=70, y=300)
textlabel4.config(text="Zahl 3:")
textlabel5 = Label(root, text="", font="Segoe 30")
textlabel5.place(x=70, y=400)
textlabel5.config(text="Zahl 4:")
textlabel6 = Label(root, text="", font="Segoe 30")
textlabel6.place(x=70, y=500)
textlabel6.config(text="Zahl 5:")
textlabel7 = Label(root, text="", font="Segoe 30")
textlabel7.place(x=70, y=600)
textlabel7.config(text="Ergebnis:")
entry1 = Entry(master=root, font="Segoe 20", bg="white")
entry1.place(x=200, y=100, width=600, height=40)
entry2 = Entry(master=root, font="Segoe 20", bg="white")
entry2.place(x=200, y=200, width=600, height=40)
entry3 = Entry(master=root, font="Segoe 20", bg="white")
entry3.place(x=200, y=300, width=600, height=40)
entry4 = Entry(master=root, font="Segoe 20", bg="white")
entry4.place(x=200, y=400, width=600, height=40)
entry5 = Entry(master=root, font="Segoe 20", bg="white")
entry5.place(x=200, y=500, width=600, height=40)
entry6 = Entry(master=root, font="Segoe 20", bg="white")
entry6.place(x=200, y=150, width=600, height=40)
entry7 = Entry(master=root, font="Segoe 20", bg="white")
entry7.place(x=200, y=250, width=600, height=40)
entry8 = Entry(master=root, font="Segoe 20", bg="white")
entry8.place(x=200, y=350, width=600, height=40)
entry9 = Entry(master=root, font="Segoe 20", bg="white")
entry9.place(x=200, y=450, width=600, height=40)
x=str(entry6.get())
z=str(entry7.get())
b=str(entry8.get())
n=str(entry9.get())
Zahl1 = float(entry1.get())
Zahl2 = float(entry2.get())
if not(z=="="):
Zahl3 = float(entry3.get())
if not(z=="=" and b=="="):
Zahl4 = float(entry4.get())
if not(z=="=" and b=="=" and n=="="):
Zahl5 = float(entry5.get())
if x == "+"and z == "=":
Ergebnis=Zahl1+Zahl2
elif x == "-"and z == "=":
Ergebnis=Zahl1-Zahl2
elif x == "x"and z == "=":
Ergebnis=Zahl1*Zahl2
elif x == ":" and z == "=":
try:
Ergebnis=Zahl1/Zahl2
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "+"and b == "=":
Ergebnis=Zahl1+Zahl2+Zahl3
elif z == "-"and x == "-"and b == "=":
Ergebnis=Zahl1-Zahl2-Zahl3
elif z == "x"and x == "x"and b == "=":
Ergebnis=Zahl1*Zahl2*Zahl3
elif z == "+"and x == "-"and b == "=":
Ergebnis=Zahl1-Zahl2+Zahl3
elif z == "-"and x == "+"and b == "=":
Ergebnis=Zahl1+Zahl2-Zahl3
elif z == "+"and x == "x"and b == "=":
Ergebnis=(Zahl1*Zahl2)+Zahl3
elif z == "x"and x == "+"and b == "=":
Ergebnis=(Zahl2*Zahl3)+Zahl1
elif z == "-"and x == "x"and b == "=":
Ergebnis=(Zahl1*Zahl2)-Zahl3
elif z == "x"and x == "-"and b == "=":
Ergebnis=Zahl1-(Zahl2*Zahl3)
elif z == "x"and x == ":"and b == "=":
try:
Ergebnis=(Zahl1/Zahl2)*Zahl3
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif x == ":" and z == ":"and b == "=":
try:
Ergebnis=(Zahl1/Zahl2)/Zahl3
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "=":
try:
Ergebnis=(Zahl1*Zahl2)/Zahl3
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "=":
try:
Ergebnis=(Zahl1/Zahl2)+Zahl3
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "=":
try:
Ergebnis=(Zahl2/Zahl3)+Zahl1
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "=":
try:
Ergebnis=(Zahl1/Zahl2)-Zahl3
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "=":
try:
Ergebnis=Zahl1-(Zahl2/Zahl3)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "+"and b == "+"and n=="=":
Ergebnis=Zahl1+Zahl2+Zahl3+Zahl4
elif z == "+"and x == "+"and b == "-"and n=="=":
Ergebnis=Zahl1+Zahl2+Zahl3-Zahl4
elif z == "+"and x == "+"and b == ":"and n=="=":
try:
Ergebnis=Zahl1+Zahl2+(Zahl3/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "+"and b == "x"and n=="=":
Ergebnis=Zahl1+Zahl2+(Zahl3*Zahl4)
elif z == "-"and x == "+"and b == "+"and n=="=":
Ergebnis=Zahl1+Zahl2-Zahl3+Zahl4
elif z == "-"and x == "+"and b == "-"and n=="=":
Ergebnis=Zahl1+Zahl2-Zahl3-Zahl4
elif z == "-"and x == "+"and b == "x"and n=="=":
Ergebnis=Zahl1+Zahl2-(Zahl3*Zahl4)
elif z == "-"and x == "+"and b == ":"and n=="=":
try:
Ergebnis=Zahl1+Zahl2-(Zahl3/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "+"and n=="=":
try:
Ergebnis=Zahl1+(Zahl2/Zahl3)+Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "-"and n=="=":
try:
Ergebnis=Zahl1+(Zahl2/Zahl3)-Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "x"and n=="=":
try:
Ergebnis=Zahl1+((Zahl2/Zahl3)*Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == ":"and n=="=":
try:
Ergebnis=Zahl1+((Zahl2/Zahl3)/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "+"and n=="=":
Ergebnis=Zahl1+(Zahl2*Zahl3)+Zahl4
elif z == "x"and x == "+"and b == "-"and n=="=":
Ergebnis=Zahl1+(Zahl2*Zahl3)-Zahl4
elif z == "x"and x == "+"and b == ":"and n=="=":
try:
Ergebnis=Zahl1+((Zahl2*Zahl3)/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "x"and n=="=":
Ergebnis=Zahl1+((Zahl2*Zahl3)*Zahl4)
elif z == "+"and x == "x"and b == "+"and n=="=":
Ergebnis=(Zahl1*Zahl2)+Zahl3+Zahl4
elif z == "+"and x == "x"and b == "-"and n=="=":
Ergebnis=(Zahl1*Zahl2)+Zahl3-Zahl4
elif z == "+"and x == "x"and b == ":"and n=="=":
try:
Ergebnis=((Zahl1*Zahl2)+(Zahl3/Zahl4))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "x"and b == "x"and n=="=":
Ergebnis=(Zahl1*Zahl2)+(Zahl3*Zahl4)
elif z == "-"and x == "x"and b == "+"and n=="=":
Ergebnis=(Zahl1*Zahl2)-Zahl3+Zahl4
elif z == "-"and x == "x"and b == "-"and n=="=":
Ergebnis=(Zahl1*Zahl2)-Zahl3-Zahl4
elif z == "-"and x == "x"and b == "x"and n=="=":
Ergebnis=(Zahl*Zahl2)-(Zahl3*Zahl4)
elif z == "-"and x == "x"and b == ":"and n=="=":
try:
Ergebnis=(Zahl1*Zahl2)-(Zahl3/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "+"and n=="=":
try:
Ergebnis=(Zahl1*(Zahl2)/Zahl3)+Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "-"and n=="=":
try:
Ergebnis=(Zahl1*(Zahl2)/Zahl3)-Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "x"and n=="=":
try:
Ergebnis=((Zahl1*Zahl2)/Zahl3)*Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == ":"and n=="=":
try:
Ergebnis=((Zahl1*Zahl2)/Zahl3)/Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "+"and n=="=":
Ergebnis=((Zahl1*Zahl2)*Zahl3)+Zahl4
elif z == "x"and x == "x"and b == "-"and n=="=":
Ergebnis=((Zahl1*Zahl2)*Zahl3)-Zahl4
elif z == "x"and x == "x"and b == ":"and n=="=":
try:
Ergebnis=((Zahl1*Zahl2)*Zahl3)/Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "x"and n=="=":
Ergebnis=((Zahl1*Zahl2)*Zahl3)*Zahl4
elif z == "+"and x == ":"and b == "+"and n=="=":
try:
Ergebnis=(Zahl1/Zahl2)+Zahl3+Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "-"and n=="=":
try:
Ergebnis=(Zahl1/Zahl2)+Zahl3-Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == ":"and n=="=":
try:
Ergebnis=(Zahl1/Zahl2)+(Zahl3/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "x"and n=="=":
try:
Ergebnis=(Zahl1/Zahl2)+(Zahl3*Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "+"and n=="=":
try:
Ergebnis=(Zahl1/Zahl2)-Zahl3+Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "-"and n=="=":
try:
Ergebnis=(Zahl1/Zahl2)-Zahl3-Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "x"and n=="=":
try:
Ergebnis=(Zahl1/Zahl2)-(Zahl3*Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == ":"and n=="=":
try:
Ergebnis=(Zahl1/Zahl2)-(Zahl3/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "+"and n=="=":
try:
Ergebnis=(Zahl/(Zahl2)/Zahl3)+Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "-"and n=="=":
try:
Ergebnis=(Zahl1/(Zahl2)/Zahl3)-Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == ":"and n=="=":
try:
Ergebnis=(Zahl1/(Zahl2)/Zahl3)/Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "x"and n=="=":
try:
Ergebnis=((Zahl1/Zahl2)/Zahl3)*Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "+"and n=="=":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)+Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "-"and n=="=":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)-Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == ":"and n=="=":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)/Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "x"and n=="=":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)*Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "+"and n=="=":
Ergebnis=Zahl1-Zahl2+Zahl3+Zahl4
elif z == "+"and x == "-"and b == "-"and n=="=":
Ergebnis=Zahl1-Zahl2+Zahl3-Zahl4
elif z == "+"and x == "-"and b == ":"and n=="=":
try:
Ergebnis=Zahl1-Zahl2+(Zahl3/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "x"and n=="=":
Ergebnis=Zahl1-Zahl2+(Zahl3*Zahl4)
elif z == "-"and x == "-"and b == "+"and n=="=":
Ergebnis=Zahl1-Zahl2-Zahl3+Zahl4
elif z == "-"and x == "-"and b == "-"and n=="=":
Ergebnis=Zahl1-Zahl2-Zahl3-Zahl4
elif z == "-"and x == "-"and b == "x"and n=="=":
Ergebnis=Zahl1-Zahl2-(Zahl3*Zahl4)
elif z == "-"and x == "-"and b == ":"and n=="=":
try:
Ergebnis=Zahl1-Zahl2-(Zahl3/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "+"and n=="=":
try:
Ergebnis=Zahl1-(Zahl2/Zahl3)+Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "-"and n=="=":
try:
Ergebnis=Zahl1-(Zahl2/Zahl3)-Zahl4
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "x"and n=="=":
try:
Ergebnis=Zahl1-((Zahl2/Zahl3)*Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == ":"and n=="=":
try:
Ergebnis=Zahl1-((Zahl2/Zahl3)/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "+"and n=="=":
Ergebnis=Zahl1-(Zahl2*Zahl3)+Zahl4
elif z == "x"and x == "-"and b == "-"and n=="=":
Ergebnis=Zahl1-(Zahl2*Zahl3)-Zahl4
elif z == "x"and x == "-"and b == ":"and n=="=":
try:
Ergebnis=Zahl1-((Zahl2*Zahl3)/Zahl4)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "x"and n=="=":
Ergebnis=Zahl1-((Zahl2*Zahl3)*Zahl4)
elif z == "+"and x == "+"and b == "+"and n=="+":
Ergebnis=Zahl1+Zahl2+Zahl3+Zahl4+Zahl5
elif z == "+"and x == "+"and b == "-"and n=="+":
Ergebnis=Zahl1+Zahl2+Zahl3-Zahl4+Zahl5
elif z == "+"and x == "+"and b == ":"and n=="+":
try:
Ergebnis=Zahl1+Zahl2+(Zahl3/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "+"and b == "x"and n=="+":
Ergebnis=Zahl1+Zahl2+(Zahl3*Zahl4)+Zahl5
elif z == "-"and x == "+"and b == "+"and n=="+":
Ergebnis=Zahl1+Zahl2-Zahl3+Zahl4+Zahl5
elif z == "-"and x == "+"and b == "-"and n=="+":
Ergebnis=Zahl1+Zahl2-Zahl3-Zahl4+Zahl5
elif z == "-"and x == "+"and b == "x"and n=="+":
Ergebnis=Zahl1+Zahl2-(Zahl3*Zahl4)+Zahl5
elif z == "-"and x == "+"and b == ":"and n=="+":
try:
Ergebnis=Zahl1+Zahl2-(Zahl3/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "+"and n=="+":
try:
Ergebnis=Zahl1+(Zahl2/Zahl3)+Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "-"and n=="+":
try:
Ergebnis=Zahl1+(Zahl2/Zahl3)-Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "x"and n=="+":
try:
Ergebnis=Zahl1+((Zahl2/Zahl3)*Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == ":"and n=="+":
try:
Ergebnis=Zahl1+((Zahl2/Zahl3)/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "+"and n=="+":
Ergebnis=Zahl1+(Zahl2*Zahl3)+Zahl4+Zahl5
elif z == "x"and x == "+"and b == "-"and n=="+":
Ergebnis=Zahl1+(Zahl2*Zahl3)-Zahl4+Zahl5
elif z == "x"and x == "+"and b == ":"and n=="+":
try:
Ergebnis=Zahl1+((Zahl2*Zahl3)/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "x"and n=="+":
Ergebnis=Zahl1+((Zahl2*Zahl3)*Zahl4)+Zahl5
elif z == "+"and x == "x"and b == "+"and n=="+":
Ergebnis=(Zahl1*Zahl2)+Zahl3+Zahl4+Zahl5
elif z == "+"and x == "x"and b == "-"and n=="+":
Ergebnis=(Zahl1*Zahl2)+Zahl3-Zahl4+Zahl5
elif z == "+"and x == "x"and b == ":"and n=="+":
try:
Ergebnis=((Zahl1*Zahl2)+(Zahl3/Zahl4))+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "x"and b == "x"and n=="+":
Ergebnis=(Zahl1*Zahl2)+(Zahl3*Zahl4)+Zahl5
elif z == "-"and x == "x"and b == "+"and n=="+":
Ergebnis=(Zahl1*Zahl2)-Zahl3+Zahl4+Zahl5
elif z == "-"and x == "x"and b == "-"and n=="+":
Ergebnis=(Zahl1*Zahl2)-Zahl3-Zahl4+Zahl5
elif z == "-"and x == "x"and b == "x"and n=="+":
Ergebnis=(Zahl*Zahl2)-(Zahl3*Zahl4)+Zahl5
elif z == "-"and x == "x"and b == ":"and n=="+":
try:
Ergebnis=(Zahl1*Zahl2)-(Zahl3/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "+"and n=="+":
try:
Ergebnis=(Zahl1*(Zahl2)/Zahl3)+Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "-"and n=="+":
try:
Ergebnis=(Zahl1*(Zahl2)/Zahl3)-Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "x"and n=="+":
try:
Ergebnis=((Zahl1*Zahl2)/Zahl3)*Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == ":"and n=="+":
try:
Ergebnis=((Zahl1*Zahl2)/Zahl3)/Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "+"and n=="+":
Ergebnis=((Zahl1*Zahl2)*Zahl3)+Zahl4+Zahl5
elif z == "x"and x == "x"and b == "-"and n=="+":
Ergebnis=((Zahl1*Zahl2)*Zahl3)-Zahl4+Zahl5
elif z == "x"and x == "x"and b == ":"and n=="+":
try:
Ergebnis=((Zahl1*Zahl2)*Zahl3)/Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "x"and n=="+":
Ergebnis=((Zahl1*Zahl2)*Zahl3)*Zahl4+Zahl5
elif z == "+"and x == ":"and b == "+"and n=="+":
try:
Ergebnis=(Zahl1/Zahl2)+Zahl3+Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "-"and n=="+":
try:
Ergebnis=(Zahl1/Zahl2)+Zahl3-Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == ":"and n=="+":
try:
Ergebnis=(Zahl1/Zahl2)+(Zahl3/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "x"and n=="+":
try:
Ergebnis=(Zahl1/Zahl2)+(Zahl3*Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "+"and n=="+":
try:
Ergebnis=(Zahl1/Zahl2)-Zahl3+Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "-"and n=="+":
try:
Ergebnis=(Zahl1/Zahl2)-Zahl3-Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "x"and n=="+":
try:
Ergebnis=(Zahl1/Zahl2)-(Zahl3*Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == ":"and n=="+":
try:
Ergebnis=(Zahl1/Zahl2)-(Zahl3/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "+"and n=="+":
try:
Ergebnis=(Zahl/(Zahl2)/Zahl3)+Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "-"and n=="+":
try:
Ergebnis=(Zahl1/(Zahl2)/Zahl3)-Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == ":"and n=="+":
try:
Ergebnis=(Zahl1/(Zahl2)/Zahl3)/Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "x"and n=="+":
try:
Ergebnis=((Zahl1/Zahl2)/Zahl3)*Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "+"and n=="+":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)+Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "-"and n=="+":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)-Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == ":"and n=="+":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)/Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "x"and n=="+":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)*Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "+"and n=="+":
Ergebnis=Zahl1-Zahl2+Zahl3+Zahl4+Zahl5
elif z == "+"and x == "-"and b == "-"and n=="+":
Ergebnis=Zahl1-Zahl2+Zahl3-Zahl4+Zahl5
elif z == "+"and x == "-"and b == ":"and n=="+":
try:
Ergebnis=Zahl1-Zahl2+(Zahl3/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "x"and n=="+":
Ergebnis=Zahl1-Zahl2+(Zahl3*Zahl4)+Zahl5
elif z == "-"and x == "-"and b == "+"and n=="+":
Ergebnis=Zahl1-Zahl2-Zahl3+Zahl4+Zahl5
elif z == "-"and x == "-"and b == "-"and n=="+":
Ergebnis=Zahl1-Zahl2-Zahl3-Zahl4+Zahl5
elif z == "-"and x == "-"and b == "x"and n=="+":
Ergebnis=Zahl1-Zahl2-(Zahl3*Zahl4)+Zahl5
elif z == "-"and x == "-"and b == ":"and n=="+":
try:
Ergebnis=Zahl1-Zahl2-(Zahl3/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "+"and n=="+":
try:
Ergebnis=Zahl1-(Zahl2/Zahl3)+Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "-"and n=="+":
try:
Ergebnis=Zahl1-(Zahl2/Zahl3)-Zahl4+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "x"and n=="+":
try:
Ergebnis=Zahl1-((Zahl2/Zahl3)*Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == ":"and n=="+":
try:
Ergebnis=Zahl1-((Zahl2/Zahl3)/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "+"and n=="+":
Ergebnis=Zahl1-(Zahl2*Zahl3)+Zahl4+Zahl5
elif z == "x"and x == "-"and b == "-"and n=="+":
Ergebnis=Zahl1-(Zahl2*Zahl3)-Zahl4+Zahl5
elif z == "x"and x == "-"and b == ":"and n=="+":
try:
Ergebnis=Zahl1-((Zahl2*Zahl3)/Zahl4)+Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "x"and n=="+":
Ergebnis=Zahl1-((Zahl2*Zahl3)*Zahl4)+Zahl5
elif z == "+"and x == "+"and b == "+"and n=="-":
Ergebnis=Zahl1+Zahl2+Zahl3+Zahl4-Zahl5
elif z == "+"and x == "+"and b == "-"and n=="-":
Ergebnis=Zahl1+Zahl2+Zahl3-Zahl4-Zahl5
elif z == "+"and x == "+"and b == ":"and n=="-":
try:
Ergebnis=Zahl1+Zahl2+(Zahl3/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "+"and b == "x"and n=="-":
Ergebnis=Zahl1+Zahl2+(Zahl3*Zahl4)-Zahl5
elif z == "-"and x == "+"and b == "+"and n=="-":
Ergebnis=Zahl1+Zahl2-Zahl3+Zahl4-Zahl5
elif z == "-"and x == "+"and b == "-"and n=="-":
Ergebnis=Zahl1+Zahl2-Zahl3-Zahl4-Zahl5
elif z == "-"and x == "+"and b == "x"and n=="-":
Ergebnis=Zahl1+Zahl2-(Zahl3*Zahl4)-Zahl5
elif z == "-"and x == "+"and b == ":"and n=="-":
try:
Ergebnis=Zahl1+Zahl2-(Zahl3/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "+"and n=="-":
try:
Ergebnis=Zahl1+(Zahl2/Zahl3)+Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "-"and n=="-":
try:
Ergebnis=Zahl1+(Zahl2/Zahl3)-Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "x"and n=="-":
try:
Ergebnis=Zahl1+((Zahl2/Zahl3)*Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == ":"and n=="-":
try:
Ergebnis=Zahl1+((Zahl2/Zahl3)/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "+"and n=="-":
Ergebnis=Zahl1+(Zahl2*Zahl3)+Zahl4-Zahl5
elif z == "x"and x == "+"and b == "-"and n=="-":
Ergebnis=Zahl1+(Zahl2*Zahl3)-Zahl4-Zahl5
elif z == "x"and x == "+"and b == ":"and n=="-":
try:
Ergebnis=Zahl1+((Zahl2*Zahl3)/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "x"and n=="-":
Ergebnis=Zahl1+((Zahl2*Zahl3)*Zahl4)-Zahl5
elif z == "+"and x == "x"and b == "+"and n=="-":
Ergebnis=(Zahl1*Zahl2)+Zahl3+Zahl4-Zahl5
elif z == "+"and x == "x"and b == "-"and n=="-":
Ergebnis=(Zahl1*Zahl2)+Zahl3-Zahl4-Zahl5
elif z == "+"and x == "x"and b == ":"and n=="-":
try:
Ergebnis=((Zahl1*Zahl2)+(Zahl3/Zahl4))-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "x"and b == "x"and n=="-":
Ergebnis=(Zahl1*Zahl2)+(Zahl3*Zahl4)-Zahl5
elif z == "-"and x == "x"and b == "+"and n=="-":
Ergebnis=(Zahl1*Zahl2)-Zahl3+Zahl4-Zahl5
elif z == "-"and x == "x"and b == "-"and n=="-":
Ergebnis=(Zahl1*Zahl2)-Zahl3-Zahl4-Zahl5
elif z == "-"and x == "x"and b == "x"and n=="-":
Ergebnis=(Zahl*Zahl2)-(Zahl3*Zahl4)-Zahl5
elif z == "-"and x == "x"and b == ":"and n=="-":
try:
Ergebnis=(Zahl1*Zahl2)-(Zahl3/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "+"and n=="-":
try:
Ergebnis=(Zahl1*(Zahl2)/Zahl3)+Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "-"and n=="-":
try:
Ergebnis=(Zahl1*(Zahl2)/Zahl3)-Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "x"and n=="-":
try:
Ergebnis=((Zahl1*Zahl2)/Zahl3)*Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == ":"and n=="-":
try:
Ergebnis=((Zahl1*Zahl2)/Zahl3)/Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "+"and n=="-":
Ergebnis=((Zahl1*Zahl2)*Zahl3)+Zahl4-Zahl5
elif z == "x"and x == "x"and b == "-"and n=="-":
Ergebnis=((Zahl1*Zahl2)*Zahl3)-Zahl4-Zahl5
elif z == "x"and x == "x"and b == ":"and n=="-":
try:
Ergebnis=((Zahl1*Zahl2)*Zahl3)/Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "x"and n=="-":
Ergebnis=((Zahl1*Zahl2)*Zahl3)*Zahl4-Zahl5
elif z == "+"and x == ":"and b == "+"and n=="-":
try:
Ergebnis=(Zahl1/Zahl2)+Zahl3+Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "-"and n=="-":
try:
Ergebnis=(Zahl1/Zahl2)+Zahl3-Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == ":"and n=="-":
try:
Ergebnis=(Zahl1/Zahl2)+(Zahl3/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "x"and n=="-":
try:
Ergebnis=(Zahl1/Zahl2)+(Zahl3*Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "+"and n=="-":
try:
Ergebnis=(Zahl1/Zahl2)-Zahl3+Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "-"and n=="-":
try:
Ergebnis=(Zahl1/Zahl2)-Zahl3-Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "x"and n=="-":
try:
Ergebnis=(Zahl1/Zahl2)-(Zahl3*Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == ":"and n=="-":
try:
Ergebnis=(Zahl1/Zahl2)-(Zahl3/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "+"and n=="-":
try:
Ergebnis=(Zahl/(Zahl2)/Zahl3)+Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "-"and n=="-":
try:
Ergebnis=(Zahl1/(Zahl2)/Zahl3)-Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == ":"and n=="-":
try:
Ergebnis=(Zahl1/(Zahl2)/Zahl3)/Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "x"and n=="-":
try:
Ergebnis=((Zahl1/Zahl2)/Zahl3)*Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "+"and n=="-":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)+Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "-"and n=="-":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)-Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == ":"and n=="-":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)/Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "x"and n=="-":
try:
Ergebnis=((Zahl1/Zahl2)*Zahl3)*Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "+"and n=="-":
Ergebnis=Zahl1-Zahl2+Zahl3+Zahl4-Zahl5
elif z == "+"and x == "-"and b == "-"and n=="-":
Ergebnis=Zahl1-Zahl2+Zahl3-Zahl4-Zahl5
elif z == "+"and x == "-"and b == ":"and n=="-":
try:
Ergebnis=Zahl1-Zahl2+(Zahl3/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "x"and n=="-":
Ergebnis=Zahl1-Zahl2+(Zahl3*Zahl4)-Zahl5
elif z == "-"and x == "-"and b == "+"and n=="-":
Ergebnis=Zahl1-Zahl2-Zahl3+Zahl4-Zahl5
elif z == "-"and x == "-"and b == "-"and n=="-":
Ergebnis=Zahl1-Zahl2-Zahl3-Zahl4-Zahl5
elif z == "-"and x == "-"and b == "x"and n=="-":
Ergebnis=Zahl1-Zahl2-(Zahl3*Zahl4)-Zahl5
elif z == "-"and x == "-"and b == ":"and n=="-":
try:
Ergebnis=Zahl1-Zahl2-(Zahl3/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "+"and n=="-":
try:
Ergebnis=Zahl1-(Zahl2/Zahl3)+Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "-"and n=="-":
try:
Ergebnis=Zahl1-(Zahl2/Zahl3)-Zahl4-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "x"and n=="-":
try:
Ergebnis=Zahl1-((Zahl2/Zahl3)*Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == ":"and n=="-":
try:
Ergebnis=Zahl1-((Zahl2/Zahl3)/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "+"and n=="-":
Ergebnis=Zahl1-(Zahl2*Zahl3)+Zahl4-Zahl5
elif z == "x"and x == "-"and b == "-"and n=="-":
Ergebnis=Zahl1-(Zahl2*Zahl3)-Zahl4-Zahl5
elif z == "x"and x == "-"and b == ":"and n=="-":
try:
Ergebnis=Zahl1-((Zahl2*Zahl3)/Zahl4)-Zahl5
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "x"and n=="-":
Ergebnis=Zahl1-((Zahl2*Zahl3)*Zahl4)-Zahl5
elif z == "+"and x == "+"and b == "+"and n=="x":
Ergebnis=Zahl1+Zahl2+Zahl3+(Zahl4*Zahl5)
elif z == "+"and x == "+"and b == "-"and n=="x":
Ergebnis=Zahl1+Zahl2+Zahl3-(Zahl4*Zahl5)
elif z == "+"and x == "+"and b == ":"and n=="x":
try:
Ergebnis=Zahl1+Zahl2+((Zahl3/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "+"and b == "x"and n=="x":
Ergebnis=Zahl1+Zahl2+((Zahl3*Zahl4)*Zahl5)
elif z == "-"and x == "+"and b == "+"and n=="x":
Ergebnis=Zahl1+Zahl2-Zahl3+(Zahl4*Zahl5)
elif z == "-"and x == "+"and b == "-"and n=="x":
Ergebnis=Zahl1+Zahl2-Zahl3-(Zahl4*Zahl5)
elif z == "-"and x == "+"and b == "x"and n=="x":
Ergebnis=Zahl1+Zahl2-((Zahl3*Zahl4)*Zahl5)
elif z == "-"and x == "+"and b == ":"and n=="x":
try:
Ergebnis=Zahl1+Zahl2-((Zahl3/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "+"and n=="x":
try:
Ergebnis=Zahl1+((Zahl2/Zahl3)+(Zahl4*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "-"and n=="x":
try:
Ergebnis=Zahl1+((Zahl2/Zahl3)-(Zahl4*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "x"and n=="x":
try:
Ergebnis=Zahl1+(((Zahl2/Zahl3)*Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == ":"and n=="x":
try:
Ergebnis=Zahl1+(((Zahl2/Zahl3)/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "+"and n=="x":
Ergebnis=Zahl1+((Zahl2*Zahl3)+(Zahl4*Zahl5))
elif z == "x"and x == "+"and b == "-"and n=="x":
Ergebnis=Zahl1+((Zahl2*Zahl3)-(Zahl4*Zahl5))
elif z == "x"and x == "+"and b == ":"and n=="x":
try:
Ergebnis=Zahl1+(((Zahl2*Zahl3)/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "x"and n=="x":
Ergebnis=Zahl1+(((Zahl2*Zahl3)*Zahl4)*Zahl5)
elif z == "+"and x == "x"and b == "+"and n=="x":
Ergebnis=(Zahl1*Zahl2)+Zahl3+(Zahl4*Zahl5)
elif z == "+"and x == "x"and b == "-"and n=="x":
Ergebnis=(((Zahl1*Zahl2)+Zahl3)-(Zahl4*Zahl5))
elif z == "+"and x == "x"and b == ":"and n=="x":
try:
Ergebnis=((Zahl1*Zahl2)+((Zahl3/Zahl4)*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "x"and b == "x"and n=="x":
Ergebnis=((Zahl1*Zahl2)+((Zahl3*Zahl4)*Zahl5))
elif z == "-"and x == "x"and b == "+"and n=="x":
Ergebnis=(((Zahl1*Zahl2)-Zahl3)+(Zahl4*Zahl5))
elif z == "-"and x == "x"and b == "-"and n=="x":
Ergebnis=(((Zahl1*Zahl2)-Zahl3)-(Zahl4*Zahl5))
elif z == "-"and x == "x"and b == "x"and n=="x":
Ergebnis=((Zahl*Zahl2)-((Zahl3*Zahl4)*Zahl5))
elif z == "-"and x == "x"and b == ":"and n=="x":
try:
Ergebnis=(Zahl1*Zahl2)-((Zahl3/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "+"and n=="x":
try:
Ergebnis=(Zahl1*(Zahl2)/Zahl3)+(Zahl4*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "-"and n=="x":
try:
Ergebnis=((Zahl1*Zahl2)/Zahl3)-(Zahl4*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "x"and n=="x":
try:
Ergebnis=((((Zahl1*Zahl2)/Zahl3)*Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == ":"and n=="x":
try:
Ergebnis=((((Zahl1*Zahl2)/Zahl3)/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "+"and n=="x":
Ergebnis=((Zahl1*Zahl2)*Zahl3)+(Zahl4*Zahl5)
elif z == "x"and x == "x"and b == "-"and n=="x":
Ergebnis=((Zahl1*Zahl2)*Zahl3)-(Zahl4*Zahl5)
elif z == "x"and x == "x"and b == ":"and n=="x":
try:
Ergebnis=((((Zahl1*Zahl2)*Zahl3)/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "x"and n=="x":
Ergebnis=((((Zahl1*Zahl2)*Zahl3)*Zahl4)*Zahl5)
elif z == "+"and x == ":"and b == "+"and n=="x":
try:
Ergebnis=((Zahl1/Zahl2)+Zahl3)+(Zahl4*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "-"and n=="x":
try:
Ergebnis=((Zahl1/Zahl2)+Zahl3)-(Zahl4*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == ":"and n=="x":
try:
Ergebnis=(Zahl1/Zahl2)+((Zahl3/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "x"and n=="x":
try:
Ergebnis=(Zahl1/Zahl2)+((Zahl3*Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "+"and n=="x":
try:
Ergebnis=((Zahl1/Zahl2)-Zahl3)+(Zahl4*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "-"and n=="x":
try:
Ergebnis=((Zahl1/Zahl2)-Zahl3)-(Zahl4*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "x"and n=="x":
try:
Ergebnis=(Zahl1/Zahl2)-((Zahl3*Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == ":"and n=="x":
try:
Ergebnis=((Zahl1/Zahl2)-((Zahl3/Zahl4)*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "+"and n=="x":
try:
Ergebnis=((Zahl/(Zahl2)/Zahl3)+(Zahl4*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "-"and n=="x":
try:
Ergebnis=((Zahl1/(Zahl2)/Zahl3)-(Zahl4*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == ":"and n=="x":
try:
Ergebnis=(((Zahl1/(Zahl2)/Zahl3)/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "x"and n=="x":
try:
Ergebnis=((((Zahl1/Zahl2)/Zahl3)*Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "+"and n=="x":
try:
Ergebnis=(((Zahl1/Zahl2)*Zahl3)+(Zahl4*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "-"and n=="x":
try:
Ergebnis=(((Zahl1/Zahl2)*Zahl3)-(Zahl4*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == ":"and n=="x":
try:
Ergebnis=((((Zahl1/Zahl2)*Zahl3)/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "x"and n=="x":
try:
Ergebnis=(((((Zahl1/Zahl2)*Zahl3)*Zahl4)*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "+"and n=="x":
Ergebnis=Zahl1-Zahl2+Zahl3+(Zahl4*Zahl5)
elif z == "+"and x == "-"and b == "-"and n=="x":
Ergebnis=Zahl1-Zahl2+Zahl3-(Zahl4*Zahl5)
elif z == "+"and x == "-"and b == ":"and n=="x":
try:
Ergebnis=Zahl1-Zahl2+((Zahl3/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "x"and n=="x":
Ergebnis=Zahl1-Zahl2+((Zahl3*Zahl4)*Zahl5)
elif z == "-"and x == "-"and b == "+"and n=="x":
Ergebnis=(((Zahl1-Zahl2)-Zahl3)+(Zahl4*Zahl5))
elif z == "-"and x == "-"and b == "-"and n=="x":
Ergebnis=(((Zahl1-Zahl2)-Zahl3)-(Zahl4*Zahl5))
elif z == "-"and x == "-"and b == "x"and n=="x":
Ergebnis=(Zahl1-(Zahl2-((Zahl3*Zahl4)*Zahl5)))
elif z == "-"and x == "-"and b == ":"and n=="x":
try:
Ergebnis=(Zahl1-(Zahl2-((Zahl3/Zahl4)*Zahl5)))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "+"and n=="x":
try:
Ergebnis=((Zahl1-(Zahl2/Zahl3))+(Zahl4*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "-"and n=="x":
try:
Ergebnis=((Zahl1-(Zahl2/Zahl3))-(Zahl4*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "x"and n=="x":
try:
Ergebnis=(Zahl1-(((Zahl2/Zahl3)*Zahl4)*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == ":"and n=="x":
try:
Ergebnis=(Zahl1-(((Zahl2/Zahl3)/Zahl4)*Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "+"and n=="x":
Ergebnis=((Zahl1-(Zahl2*Zahl3))+(Zahl4*Zahl5))
elif z == "x"and x == "-"and b == "-"and n=="x":
Ergebnis=((Zahl1-(Zahl2*Zahl3))-(Zahl4*Zahl5))
elif z == "x"and x == "-"and b == ":"and n=="x":
try:
Ergebnis=Zahl1-(((Zahl2*Zahl3)/Zahl4)*Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "x"and n=="x":
Ergebnis=Zahl1-(((Zahl2*Zahl3)*Zahl4)*Zahl5)
elif z == "+"and x == "+"and b == "+"and n==":":
try:
Ergebnis=Zahl1+Zahl2+Zahl3+(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "+"and b == "-"and n==":":
try:
Ergebnis=Zahl1+Zahl2+Zahl3-(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "+"and b == ":"and n==":":
try:
Ergebnis=Zahl1+Zahl2+((Zahl3/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "+"and b == "x"and n==":":
try:
Ergebnis=Zahl1+Zahl2+((Zahl3*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "+"and b == "+"and n==":":
try:
Ergebnis=Zahl1+Zahl2-Zahl3+(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "+"and b == "-"and n==":":
try:
Ergebnis=Zahl1+Zahl2-Zahl3-(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "+"and b == "x"and n==":":
try:
Ergebnis=Zahl1+Zahl2-((Zahl3*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "+"and b == ":"and n==":":
try:
Ergebnis=Zahl1+Zahl2-((Zahl3/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "+"and n==":":
try:
Ergebnis=Zahl1+((Zahl2/Zahl3)+(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "-"and n==":":
try:
Ergebnis=Zahl1+((Zahl2/Zahl3)-(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == "x"and n==":":
try:
Ergebnis=Zahl1+(((Zahl2/Zahl3)*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "+"and b == ":"and n==":":
try:
Ergebnis=Zahl1+(((Zahl2/Zahl3)/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "+"and n==":":
try:
Ergebnis=Zahl1+((Zahl2*Zahl3)+(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "-"and n==":":
try:
Ergebnis=Zahl1+((Zahl2*Zahl3)-(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == ":"and n==":":
try:
Ergebnis=Zahl1+(((Zahl2*Zahl3)/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "+"and b == "x"and n==":":
try:
Ergebnis=Zahl1+(((Zahl2*Zahl3)*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "x"and b == "+"and n==":":
try:
Ergebnis=(Zahl1*Zahl2)+Zahl3+(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "x"and b == "-"and n==":":
try:
Ergebnis=(((Zahl1*Zahl2)+Zahl3)-(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "x"and b == ":"and n==":":
try:
Ergebnis=((Zahl1*Zahl2)+((Zahl3/Zahl4)/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "x"and b == "x"and n==":":
try:
Ergebnis=((Zahl1*Zahl2)+((Zahl3*Zahl4)/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "x"and b == "+"and n==":":
try:
Ergebnis=(((Zahl1*Zahl2)-Zahl3)+(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "x"and b == "-"and n==":":
try:
Ergebnis=(((Zahl1*Zahl2)-Zahl3)-(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "x"and b == "x"and n==":":
try:
Ergebnis=((Zahl*Zahl2)-((Zahl3*Zahl4)/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "x"and b == ":"and n==":":
try:
Ergebnis=(Zahl1*Zahl2)-((Zahl3/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "+"and n==":":
try:
Ergebnis=(Zahl1*(Zahl2)/Zahl3)+(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "-"and n==":":
try:
Ergebnis=((Zahl1*Zahl2)/Zahl3)-(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == "x"and n==":":
try:
Ergebnis=((((Zahl1*Zahl2)/Zahl3)*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "x"and b == ":"and n==":":
try:
Ergebnis=((((Zahl1*Zahl2)/Zahl3)/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "+"and n==":":
try:
Ergebnis=((Zahl1*Zahl2)*Zahl3)+(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "-"and n==":":
Ergebnis=((Zahl1*Zahl2)*Zahl3)-(Zahl4/Zahl5)
elif z == "x"and x == "x"and b == ":"and n==":":
try:
Ergebnis=((((Zahl1*Zahl2)*Zahl3)/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "x"and b == "x"and n==":":
try:
Ergebnis=((((Zahl1*Zahl2)*Zahl3)*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "+"and n==":":
try:
Ergebnis=((Zahl1/Zahl2)+Zahl3)+(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "-"and n==":":
try:
Ergebnis=((Zahl1/Zahl2)+Zahl3)-(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == ":"and n==":":
try:
Ergebnis=(Zahl1/Zahl2)+((Zahl3/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == ":"and b == "x"and n==":":
try:
Ergebnis=(Zahl1/Zahl2)+((Zahl3*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "+"and n==":":
try:
Ergebnis=((Zahl1/Zahl2)-Zahl3)+(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "-"and n==":":
try:
Ergebnis=((Zahl1/Zahl2)-Zahl3)-(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == "x"and n==":":
try:
Ergebnis=(Zahl1/Zahl2)-((Zahl3*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == ":"and b == ":"and n==":":
try:
Ergebnis=((Zahl1/Zahl2)-((Zahl3/Zahl4)/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "+"and n==":":
try:
Ergebnis=((Zahl/(Zahl2)/Zahl3)+(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "-"and n==":":
try:
Ergebnis=((Zahl1/(Zahl2)/Zahl3)-(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == ":"and n==":":
try:
Ergebnis=(((Zahl1/(Zahl2)/Zahl3)/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == ":"and b == "x"and n==":":
try:
Ergebnis=((((Zahl1/Zahl2)/Zahl3)*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "+"and n==":":
try:
Ergebnis=(((Zahl1/Zahl2)*Zahl3)+(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "-"and n==":":
try:
Ergebnis=(((Zahl1/Zahl2)*Zahl3)-(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == ":"and n==":":
try:
Ergebnis=((((Zahl1/Zahl2)*Zahl3)/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == ":"and b == "x"and n==":":
try:
Ergebnis=(((((Zahl1/Zahl2)*Zahl3)*Zahl4)/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "+"and n==":":
try:
Ergebnis=Zahl1-Zahl2+Zahl3+(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "-"and n==":":
try:
Ergebnis=Zahl1-Zahl2+Zahl3-(Zahl4/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == ":"and n==":":
try:
Ergebnis=Zahl1-Zahl2+((Zahl3/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "+"and x == "-"and b == "x"and n==":":
try:
Ergebnis=Zahl1-Zahl2+((Zahl3*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "-"and b == "+"and n==":":
try:
Ergebnis=(((Zahl1-Zahl2)-Zahl3)+(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "-"and b == "-"and n==":":
try:
Ergebnis=(((Zahl1-Zahl2)-Zahl3)-(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "-"and b == "x"and n==":":
try:
Ergebnis=(Zahl1-(Zahl2-((Zahl3*Zahl4)/Zahl5)))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "-"and x == "-"and b == ":"and n==":":
try:
Ergebnis=(Zahl1-(Zahl2-((Zahl3/Zahl4)/Zahl5)))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "+"and n==":":
try:
Ergebnis=((Zahl1-(Zahl2/Zahl3))+(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "-"and n==":":
try:
Ergebnis=((Zahl1-(Zahl2/Zahl3))-(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == "x"and n==":":
try:
Ergebnis=(Zahl1-(((Zahl2/Zahl3)*Zahl4)/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == ":"and x == "-"and b == ":"and n==":":
try:
Ergebnis=(Zahl1-(((Zahl2/Zahl3)/Zahl4)/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "+"and n==":":
try:
Ergebnis=((Zahl1-(Zahl2*Zahl3))+(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "-"and n==":":
try:
Ergebnis=((Zahl1-(Zahl2*Zahl3))-(Zahl4/Zahl5))
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == ":"and n==":":
try:
Ergebnis=Zahl1-(((Zahl2*Zahl3)/Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
elif z == "x"and x == "-"and b == "x"and n==":":
try:
Ergebnis=Zahl1-(((Zahl2*Zahl3)*Zahl4)/Zahl5)
except ZeroDivisionError:
print("Durch 0 darf man nicht teilen")
Ergebnis = "Nicht definiert"
def Ergebnis_():
textlabel8 = Label(root, text=Ergebnis, font="Segoe 40")
textlabel8.place(x=300, y=600)
Ergebnis__ = ttk.Button(root, text="Ergebnis anzeigen", command=Ergebnis_)
Ergebnis__.place(x=850, y=250, width=100, height=80)
root.mainloop()