homework help for beginner!

A forum for general discussion of the Python programming language.

homework help for beginner!

Postby thexchosenxone » Mon Apr 14, 2014 11:01 pm

Just started python this week and I am stuck on a homework problem. If somebody could just point me in the right direction that would be awesome. Problem:
Write a series of Python statements that will prompt the user for three strings. Then, using an if statement, print them in alphabetical order.
Any input is appreciated, thanks!
thexchosenxone
 
Posts: 1
Joined: Mon Apr 14, 2014 10:59 pm

Re: homework help for beginner!

Postby metulburr » Mon Apr 14, 2014 11:19 pm

New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1562
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: homework help for beginner!

Postby Marbelous » Tue Apr 15, 2014 3:47 pm

Here is my input:

zebra
monkey
aardvark

Now, you're going to have to store those values somehow as the use inputs them so you have them to sort and print later. A python list would be a good container.

So, start off with an empty list, and query the user for words to fill it up to three entries. Can you start that??? Give it a try and post your code...
Marbelous
 
Posts: 158
Joined: Fri May 31, 2013 8:12 pm


Return to General Discussions

Who is online

Users browsing this forum: Conda11, Google [Bot], mckryall and 2 guests