Why there is a mistake? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why there is a mistake?

a = int(input("Enter first number")) b = int(input("Enter second number")) c = input("Choose action") if c==+: #it says that there is an unvalid syntax result=a+b print("Result:", result)

10th Aug 2018, 12:38 PM
ПризракTM
ПризракTM - avatar
2 Answers
+ 4
if c == "+":
10th Aug 2018, 1:06 PM
Markus Kaleton
Markus Kaleton - avatar
0
thanks!
10th Aug 2018, 1:13 PM
ПризракTM
ПризракTM - avatar