diff --git a/hw01/main.py b/hw01/main.py new file mode 100644 index 0000000..f931dcc --- /dev/null +++ b/hw01/main.py @@ -0,0 +1,20 @@ +def add(x,y): + return x+y + + +def calc(): + while(True): + operation = input("Enter operation from [+]: ") + if operation == "+": + break + print("Enter valid operation") + + x = float(input("1. Enter number: ")) + y = float(input("2. Enter number: ")) + + if operation == "+": + print(add(x,y)) + + +if __name__ == "__main__": + calc() \ No newline at end of file