+ 1

Is there a problem on sololearn?

I can't do inputs in the playground in python:( https://sololearn.com/compiler-playground/cjl4GTuq78CI/?ref=app

24th Jul 2025, 5:01 PM
Mr. Man
Mr. Man - avatar
15 Antwoorden
+ 5
Mr. Man , after fixing all the mentioned issues, there will be an other bug that should be fixed: ... print = int(input("enter the correct answer ")) ... > the line shown above will shadow the built-in *print()* function in the current scope, because it assigns an *int value* to the name *print*. > after this line is executed, print is no longer a function, but a *regular variable*. > so calling this variable like print('hello') will create a `TypeError` => int object is not callable. in general: > since you have not started learning from any python tutorial upto now, i would recommend you to start with the *introduction to python*.
24th Jul 2025, 5:46 PM
Lothar
Lothar - avatar
+ 5
Mila , it is seen as more helpful when we are not going to post a ready-made code. it is better to give hints and tips, so that the asker has a chance to find a solution by himself.
24th Jul 2025, 5:59 PM
Lothar
Lothar - avatar
+ 2
Yeah you need to fix your indentation of the elif like Mila said. Python is such an annoying princess like that.
24th Jul 2025, 5:28 PM
The Witcher
The Witcher - avatar
+ 2
Thanks for everybody that helped me 😄 :>
24th Jul 2025, 9:40 PM
Mr. Man
Mr. Man - avatar
+ 1
Yes, there are errors in your code. You need to move elif to the same level as if.
24th Jul 2025, 5:25 PM
Mila
Mila - avatar
+ 1
Also, in the declaration of the correct_answer variable, you don't need to convert the number 50 to an int. It is already an integer. correct_answer = 50
24th Jul 2025, 5:28 PM
Mila
Mila - avatar
+ 1
And your print() is invalid. You have: print = int(input()), but correct print is print(int(input()).
24th Jul 2025, 5:40 PM
Mila
Mila - avatar
24th Jul 2025, 5:55 PM
Mila
Mila - avatar
+ 1
Lothar, did you see the title of the question? It is possible that the person will not understand what "level" means in Python. A beginner needs help. I myself don't like Python because of the spaces. Python is very specific and not suitable for everyone.
24th Jul 2025, 6:04 PM
Mila
Mila - avatar
+ 1
Mr. Man, I recommend you take the Introduction to Python course to understand what kind of programming language it is.
24th Jul 2025, 6:06 PM
Mila
Mila - avatar
+ 1
Besides for the python errors, how do figure the correct answer to be 50 it is actually 75 When you do 50 + 40 ÷ 2 + 5 you must first divide 40 by 2 then add 50 then add 5 If you want to get 50 you need to do (50+40)/2 + 5
24th Jul 2025, 7:30 PM
Zvi
Zvi - avatar
+ 1
Don't put print before input
29th Jul 2025, 6:36 AM
Ashton Hively
Ashton Hively - avatar
0
You should use if statement
30th Jul 2025, 5:17 PM
Omi Patil
Omi Patil - avatar
0
Instead of elif
30th Jul 2025, 5:17 PM
Omi Patil
Omi Patil - avatar