There really is no hope of making this code even half-way decent without
spending the time to rewrite them all properly. Don't want to do any of
that
This commit is contained in:
2025-11-03 17:08:35 +01:00
parent 21a17e33fa
commit ede0ee318b
48 changed files with 1219 additions and 582 deletions

View File

@@ -1,10 +1,11 @@
#Library import
# Library import
import math
#Startup
# Startup
out = 0
print("""
print(
"""
,--------. ,--. ,--.
'--. .--',--,--. ,---. ,---.| ,---. ,---. ,--,--, ,--.--. ,---. ,---.| ,---. ,--,--, ,---. ,--.--.
@@ -17,17 +18,18 @@ print("""
Build 1
28.05.21
""")
"""
)
#Userinput
# Userinput
i = input("Rechung eingeben: ")
#Separation
# Separation
l = i.split()
x1 = l.pop(0)
x = int(x1)
#Calculation
# Calculation
if len(l) == 1:
print("Wrong entry, retry, use spaces in between numbers and operands.")
else:
@@ -45,22 +47,22 @@ else:
elif "/" or ":" in l:
out = x / y
elif "^" or "**" in l:
out = x ** y
out = x**y
elif "<>" in l:
math.sqrt(x)
else:
print("unkown operand, retry")
if len(l) != 0:
operand = l.pop(0)
x = out
else:
print("The result is:")
#Output
print(out)
# Output
print(out)