How do I show a message with input in Python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I show a message with input in Python?

I am trying to write a simple program to interact with a user, however I am running into an issue with the way that Python is running it. Code: adore = input ("do you like me? Type yes or no :") print (adore) I was going to write some code to respond to that input. (Yes = aww, thanks!; No = boo to you too) Problem is that the Python module doesn't show the prompt, it just tells the user that they need to input one or several things. How do I add the message to the prompt and show people what to write?

12th Feb 2022, 2:01 AM
Elle Beedub
Elle Beedub - avatar
6 Answers
+ 5
The thing what you're trying to do isn't possible in Sololearn. Better you try doing it in an interactive ide like pydroid 3 or pycharm
12th Feb 2022, 2:08 AM
Simba
Simba - avatar
+ 3
Yes
12th Feb 2022, 2:43 AM
Simba
Simba - avatar
+ 2
Elle Beedub I have been using PyDroid which you can find on the play store here: https://play.google.com/store/apps/details?id=ru.iiec.pydroid3 You can have an input string like you're wanting!
12th Feb 2022, 4:45 AM
ForgetfulMemoryFoam
ForgetfulMemoryFoam - avatar
+ 2
Your code has problem it should be like this: Adore=str(input("............").lower()) If Adore == "yes" : Print("aww,thanks") elif Adore == "no" : Print("boo to you")
12th Feb 2022, 12:12 PM
Amir H.R.N
Amir H.R.N - avatar
+ 1
Solo learn can't do that. You have to do an interactive ide like pycharm
12th Feb 2022, 6:51 PM
okonkwo calistus
okonkwo calistus - avatar
0
Are those apps available for Android?
12th Feb 2022, 2:15 AM
Elle Beedub
Elle Beedub - avatar