Python input prompt doesn’t work. | Sololearn: Learn to code for FREE!
+ 1

Python input prompt doesn’t work.

When I try: x=input("enter your name") print(x) It will pop up with ‚ÄúLooks like your program needs input‚ÄĚ Instead of saying ‚Äúenter your name‚ÄĚ. If I input Bob, the output is: ‚Äúenter your nameBob‚ÄĚ.

26th Oct 2021, 4:31 PM
Toby
Toby - avatar
2 Réponses
+ 2
Toby Steer that's just how the sololearn code playground works. It checks if the code needs input. If it does it displays a popup where it asks you to provide all the inputs the program needs. Then the code is sent to a server, executed, and the result returned. There is no real interactivity.
26th Oct 2021, 7:54 PM
Simon Sauter
Simon Sauter - avatar
+ 1
x = input("Enter your name ") Or print("Enter your name ") x = input( )
26th Oct 2021, 4:47 PM
Neethu Nath
Neethu Nath - avatar