+ 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?

29th Dec 2018, 7:25 AM
Quinton
15 Respostas
+ 5
You may clear this as : Number = int(input("Enter the number : " )) Your output will be, Enter the number :
29th Dec 2018, 7:38 AM
Bipin Tatkare
Bipin Tatkare - avatar
29th Dec 2018, 8:25 AM
Bipin Tatkare
Bipin Tatkare - avatar
+ 5
Actually first comment i wrote by mistakenly so sorry for that. I corrected it. See again Sorry to make misunderstanding. 😁😁😁
29th Dec 2018, 8:23 AM
Bipin Tatkare
Bipin Tatkare - avatar
+ 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. 👍
29th Dec 2018, 8:24 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 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: "))
29th Dec 2018, 7:46 AM
Ikechukwu Okonkwo
Ikechukwu Okonkwo - avatar
+ 4
Bipin Tatkare - (B. R. T) the semi-colon should be inside the double quote....
29th Dec 2018, 7:53 AM
Ikechukwu Okonkwo
Ikechukwu Okonkwo - avatar
+ 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?
29th Dec 2018, 8:07 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 4
Bipin Tatkare - (B. R. T) you're welcome..✌✌ Kishalaya Saha thanks for the clarification.. 👍👍
29th Dec 2018, 8:31 AM
Ikechukwu Okonkwo
Ikechukwu Okonkwo - avatar
+ 3
Bipin Tatkare - (B. R. T) ohh...really?? Okay..👍
29th Dec 2018, 7:56 AM
Ikechukwu Okonkwo
Ikechukwu Okonkwo - avatar
+ 3
Kishalaya Saha I m using PyCharm
29th Dec 2018, 8:11 AM
Bipin Tatkare
Bipin Tatkare - avatar
+ 3
29th Dec 2018, 8:16 AM
Bipin Tatkare
Bipin Tatkare - avatar
29th Dec 2018, 8:19 AM
Bipin Tatkare
Bipin Tatkare - avatar
+ 2
It is not required that semicolon should be in the double quote... 💫iYkE4LIFE💫
29th Dec 2018, 7:55 AM
Bipin Tatkare
Bipin Tatkare - avatar
+ 2
Yeah bro 💫iYkE4LIFE💫 😉😉
29th Dec 2018, 7:57 AM
Bipin Tatkare
Bipin Tatkare - avatar
+ 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.
29th Dec 2018, 8:15 AM
Kishalaya Saha
Kishalaya Saha - avatar