+ 3

Excuse me, why do they always ask us to input without telling us what it is for in python.

In python, when you put input, it will not tell you what it is about. if you are a python coder you will know what i am talking about

15th Aug 2025, 6:06 PM
Ivan
Ivan - avatar
4 Risposte
+ 8
Sololearn runs your Python program as a background batch job. In order give it input, the batch job must read input from a file. By design, batch jobs cannot be interactive with a console. So, before running your program, the script that submits the batch job scans your source code for input keywords. If it finds any, then it prompts you for the input and stores your entries into the file that is later provided to the batch job at run time. Because the input is gathered before runtime, it does not know what the prompt should be. It just asks generically for you to enter whatever the program may expect as input.
15th Aug 2025, 8:25 PM
Brian
Brian - avatar
+ 4
I always add comments in my Python code so the user will know what the input is for. I also add a default input so the program doesn't crash if the user doesn't enter any input.
15th Aug 2025, 10:38 PM
Keith
Keith - avatar
+ 3
Petr Nedoma You are clearly spamming the forums and I sent you a DM as a courtesy. Please review the forum guidelines. https://www.sololearn.com/Discuss/3021159/?ref=app
15th Aug 2025, 10:46 PM
Keith
Keith - avatar
+ 2
maybe you think for something like this? input("please enter a/n...:" )
15th Aug 2025, 6:28 PM
Mihaly Nyilas
Mihaly Nyilas - avatar