[Tutor] Python user input and return
Alan Gauld
learn2program at gmail.com
Sun Sep 5 19:04:40 EDT 2021
Always use Reply All or reply List when responding to tutor mails,
otherwise it only goes to the recipient.
On 05/09/2021 21:35, chandar pass wrote:
> I guess I am asking how I would store their input to print it out.
Just assign it to a variable as I showed:
> > input("What is your second favorite Jits move? :")
>
>
> Now you ask the user for a choice. but you do not store
> that choice anywhere. Python is not clever enough to know
> where you want to store it, you have to give it a
> variable name, something like:
>
> option = input(...)
>
See the assignment above.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list