Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93976
| Date | 2015-07-16 20:40 -0600 |
|---|---|
| From | Michael Torrie <torriem@gmail.com> |
| Subject | Re: Need assistance |
| References | <225d4ac6-3b88-4844-805b-b4b00cd62ef4@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.619.1437100840.3674.python-list@python.org> (permalink) |
On 07/16/2015 08:15 PM, craig.sirna@gmail.com wrote:
> I need help writing a homework program.
>
> I'll write it, but I can't figure out how to incorporate what I have
> read in the book to work in code.
Can you post the code that you are currently working with?
> The assignment wants us to take a users first, middle and last name
> in a single input ( name=('enter your full name: )).
>
> Then we must display the full name rearranged in Last, First Middle
> order.
>
> I tried to use the search function in Python to locate any spaces in
> the input. It spot back the index 5 (I used Craig Daniel Sirna)
Which search function are you talking about? Is it a string method or
something else?
One of the first string methods I learned about when I first started
with Python was the .split() method. For example, in the interactive
shell try this:
>>> a="one,two,three"
>>> a.split(',')
Does this help at all?
> That is correct for the first space, but I can't figure out how to
> get it to continue to the next space.
> The indexing process is also a bit confusingto me.
Which part of indexing is confusing? The syntax for slicing? I admit I
sometimes find it a bit complicated to know when and where to use -1 as
the index.
> I get that I can use len(fullName) to set the length of the index,
> and how the index is counted, but after that I'm lost.
>
> I have emailed my professor a few times, but haven't gotten a
> response.(online course)
>
> Any help would be greatly appreciated.
Again, show us the code you have so far and maybe we can help you figure
it out.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Need assistance craig.sirna@gmail.com - 2015-07-16 19:15 -0700
Re: Need assistance Michael Torrie <torriem@gmail.com> - 2015-07-16 20:40 -0600
Re: Need assistance craig.sirna@gmail.com - 2015-07-16 20:00 -0700
RE: Need assistance "Joseph Lee" <joseph.lee22590@gmail.com> - 2015-07-16 20:12 -0700
RE: Need assistance "Joseph Lee" <joseph.lee22590@gmail.com> - 2015-07-16 19:44 -0700
Re: Need assistance Michael Torrie <torriem@gmail.com> - 2015-07-16 21:00 -0600
Re: Need assistance Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-07-17 16:40 +0000
Re: Need assistance Igor Korot <ikorot01@gmail.com> - 2015-07-17 12:54 -0400
Re: Need assistance Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-17 20:00 +0100
Re: Need assistance Denis McMahon <denismfmcmahon@gmail.com> - 2015-07-18 00:40 +0000
Re: Need assistance Sibylle Koczian <nulla.epistola@web.de> - 2015-07-18 12:35 +0200
Re: Need assistance Denis McMahon <denismfmcmahon@gmail.com> - 2015-07-19 00:59 +0000
Re: Need assistance MRAB <python@mrabarnett.plus.com> - 2015-07-19 17:35 +0100
flipping string order Denis McMahon <denismfmcmahon@gmail.com> - 2015-07-19 18:06 +0000
Re: Need assistance Laura Creighton <lac@openend.se> - 2015-07-18 14:16 +0200
RE: Need assistance "Joseph Lee" <joseph.lee22590@gmail.com> - 2015-07-18 09:05 -0700
Re: Need assistance Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-07-18 12:18 -0400
Re: Need assistance Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-18 18:34 +0100
Re: Need assistance mm0fmf <none@mailinator.com> - 2015-07-18 19:51 +0100
Re: Need assistance Joel Goldstick <joel.goldstick@gmail.com> - 2015-07-18 15:10 -0400
Re: Need assistance mm0fmf <none@mailinator.com> - 2015-07-18 20:35 +0100
Re: Need assistance Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-07-18 17:44 -0400
Re: Need assistance Michael Torrie <torriem@gmail.com> - 2015-07-18 20:46 -0600
Re: Need assistance Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-07-18 17:34 -0400
Re: Need assistance William Ray Wing <wrw@mac.com> - 2015-07-18 14:28 -0400
Re: Need assistance MRAB <python@mrabarnett.plus.com> - 2015-07-19 01:14 +0100
Re: Need assistance craig.sirna@gmail.com - 2015-07-19 16:06 -0700
Re: Need assistance Michael Torrie <torriem@gmail.com> - 2015-07-19 17:56 -0600
Re: Need assistance Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-19 17:21 -0700
Re: Need assistance Michael Torrie <torriem@gmail.com> - 2015-07-19 23:16 -0600
Re: Need assistance Chris Angelico <rosuav@gmail.com> - 2015-07-20 15:25 +1000
csiph-web