+ 1

Why's there an error

I need help with the calculator that im making and there's an error in line 4 and idk why https://sololearn.com/compiler-playground/cOuhypuQs3Cs/?ref=app

25th Jun 2025, 8:41 AM
Abdulrahman alturk
Abdulrahman alturk - avatar
5 Respuestas
+ 2
Abdulrahman alturk +,-,*,/ are strings in your code so they should be enclosed with quotations. And it's "==" not "=" while comparing.
25th Jun 2025, 8:50 AM
Manav Roy
Manav Roy - avatar
+ 1
still no difference
25th Jun 2025, 8:44 AM
Abdulrahman alturk
Abdulrahman alturk - avatar
+ 1
Thanks 😊
25th Jun 2025, 8:53 AM
Abdulrahman alturk
Abdulrahman alturk - avatar
0
+ is not a string. "+" is a string. same goes for the other operators in the comparisons.
25th Jun 2025, 8:42 AM
Lisa
Lisa - avatar
0
Use two = symbols in if statements. By the way if you wanna get advanced in python then you should try making a complex project like (it's tottally not fake) https://sololearn.com/compiler-playground/c6l8CNwt0gTZ/?ref=app
25th Jun 2025, 8:53 AM
Vaibhav
Vaibhav - avatar