0
Please see this code, and say what i do wrong
I'm dont know why code is not working https://code.sololearn.com/ci0Nl3UF1ApT/?ref=app
6 Réponses
+ 1
Use return rather than using print
Take user input correctly:
x=int(input())
...
Use (:) after def and if's, correct indentation errors...etc.
edit]: Тимофей, I said that you have to take input like this:
...
x=int(input())
...
anyway, I have corrected your code:
https://code.sololearn.com/cerRWkG6aGaI/?ref=app
+ 2
f=input(); print(f, "=", eval(f)) # Input: 3+2
Good Luck
+ 1
Thank you all!
0
and inside the if else statements use a string to check if the symbol is entered.
enclose them inside quotes
for example
if i == "+":
print(z+5)
Use return instead of print inside the functions
Eg
return x+y
0
I'm try
0
New error😂