+ 1
Custom input message in Py 3?
How would one go about customizing the input prompt in Python 3 & up, if not via the Sololearn app, maybe on the python IDLE? I'm trying to figure out how to print something like "Enter x information : " when I request user input, example: x = int(input()) How can I make it clear to the user I'm asking for a number?
15 Respuestas
+ 5
You may clear this as :
Number = int(input("Enter the number : " ))
Your output will be,
Enter the number :
+ 6
✌ thanks Kishalaya Saha 💫iYkE4LIFE💫
+ 5
Actually first comment i wrote by mistakenly so sorry for that.
I corrected it. See again
Sorry to make misunderstanding. 😁😁😁
+ 5
Bipin Tatkare - (B. R. T)
I can see now that you've put the colons inside the quotes in the code, and edited your original comment as well. This is exactly what 💫iYkE4LIFE💫 and I were trying to suggest. 👍
+ 4
Quinton B. Note that you can't customize it on sololearn but Bipin Tatkare - (B. R. T) is this not the correct way??..👇👇👇
Number = int(input("Enter the number: "))
+ 4
Bipin Tatkare - (B. R. T) the semi-colon should be inside the double quote....
+ 4
Bipin Tatkare - (B. R. T)
I, too, don't think it's okay to put the colon outside the quotes in the input prompt. Which version of Python are you using?
+ 4
Bipin Tatkare - (B. R. T) you're welcome..✌✌ Kishalaya Saha thanks for the clarification.. 👍👍
+ 3
Bipin Tatkare - (B. R. T) ohh...really?? Okay..👍
+ 3
Kishalaya Saha I m using PyCharm
+ 3
Ok wait Kishalaya Saha
+ 2
It is not required that semicolon should be in the double quote... 💫iYkE4LIFE💫
+ 2
Yeah bro 💫iYkE4LIFE💫 😉😉
+ 2
Bipin Tatkare - (B. R. T) PyCharm is not a version of Python. I ran your code in Python 3.7, and it gave me syntax error.