+ 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 Answers
+ 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.