Preparing git repo for final project

This commit is contained in:
2023-07-09 11:19:26 +02:00
parent 6a38966eef
commit 63d06d6b35
67 changed files with 1587 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
def main():
expression = input("Enter an arithmetic expression:\t\t")
x, y, z = expression.split()
result = 0.0
if y == '+':
result = int(x) + int(z)
elif y == '-':
result = int(x) - int(z)
elif y == '*':
result = int(x) * int(z)
elif y == '/':
result = int(x) / int(z)
print(round(float(result), 1))
if __name__ == "__main__":
main()