AceLewis / my_first_calculator.py

my_first_calculator.py
4.07k stars 452 forks source link

Wayy to complicated #143

Closed ac123-blip closed 3 years ago

ac123-blip commented 3 years ago

Buddy, 16 lines of code will do the same thing as these thousands of lines.

Here's a friendly suggestion of how you can modify it: print("welcome to calculator") num1 = int(input("enter yo first number: ")) sign = input("enter yo operation: +,-,* or /: ") num2 = int(input("enter yo second num: "))

if sign == "+": print(num1+num2)

if sign == "-": print(num1-num2)

if sign == "": print(num1num2)

if sign == "/": print(num1/num2)

Simple!

ac123-blip commented 3 years ago

wait...just read the readme.md... sorry for the quick judgement!