- 1

Please can anyone assist to debug this program for me?

Its just a simple calculator using if statement in Python https://code.sololearn.com/csq1bt959x9H/?ref=app

18th Jan 2022, 4:20 PM
Yusuf Bello Garga
Yusuf Bello Garga - avatar
7 Answers
+ 1
I cant able to run it, whats the bug in tge program
18th Jan 2022, 4:45 PM
Yusuf Bello Garga
Yusuf Bello Garga - avatar
+ 1
I ran it several times without a problem. Are you running the code in code playground or somewhere else? If you can't run, there is surely an error message - which is it?
18th Jan 2022, 4:51 PM
Emerson Prado
Emerson Prado - avatar
+ 1
See my 2nd question
18th Jan 2022, 4:54 PM
Emerson Prado
Emerson Prado - avatar
0
First, pls post your question only once! I found nothing wrong. What's your question?
18th Jan 2022, 4:33 PM
Emerson Prado
Emerson Prado - avatar
0
num1 = float(input("First Number:")) op = float(input("Enter operand")) num2 = float(input("Enter Second Number")) if op == "+": print(num1 + num2 ) elif op == "*": print(num1 * num2 ) elif op == "-": print(num1 - num2 ) elif op == "/": print(num1 / num2 ) else: print("invalid operator")
18th Jan 2022, 4:44 PM
Yusuf Bello Garga
Yusuf Bello Garga - avatar
0
Just use op = input("Enter operator")
18th Jan 2022, 4:50 PM
Jayakrishna 🇼🇳
0
In a play background and on a pycharm
18th Jan 2022, 4:52 PM
Yusuf Bello Garga
Yusuf Bello Garga - avatar