[Tutor] Python user input and return

chandar pass chandarpass at gmail.com
Sun Sep 5 19:46:35 EDT 2021


After a little research and playing around I was able to get my desired
output

######Jits project######


User_input = input("What is your favorite Jits move? :")

print("{} is a sweet submission!".format(User_input))

User_input2 = input("What is your second favorite Jits move? :")

print("{} is also a sweet submission!".format(User_input2))

print ("Now hit the mats and rip those submissions!!")

On Sun, Sep 5, 2021 at 4:04 PM Alan Gauld <learn2program at gmail.com> wrote:

> 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