Adding session03 homework

Thanks!
Awesome, I was hoping there was an easier way to do that.  This felt clunky
and I had no end of headaches until I figured out I didn't have to subtract
one from the len() when using as the range() in a for loop.

Thanks!

On Sun, Oct 19, 2014 at 11:44 PM, Christopher H.Barker, PhD <
notifications@github.com> wrote:

> In Students/RPerkins/session03/mailroom.py:
>
> > +        answer = str(new_answer)
> > +    return answer
> > +
> > +
> > +def get_donation():
> > +    """ Prompt for donation amount, validate input, return amount"""
> > +    d = u' '
> > +    while not d.isnumeric():
> > +        new_d = raw_input("Enter donation amount (must be numeric)-->")
> > +        d = unicode(new_d)
> > +    return str(d)
> > +
> > +
> > +def in_dbase(i_name, tar_dbase):
> > +    """ Check if name is in dbase and return boolean """
> > +    for i in range(len(tar_dbase)):
>
> generally don't want to loop through indexes. try:
>
> for donor in tar_dbase:
>     if i_name in donor:
> ....
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/UWPCE-PythonCert/IntroToPython/pull/39/files#r19069684>
> .
>



-- 
*Robert Perkins*
*Mobile:* 425-239-9269
*Email:* meshmote@gmail.com
 *Professional Profile
<http://www.linkedin.com/pub/robert-perkins/9/a6a/a91>*
<http://maps.google.com/maps?q=&hl=en>
See who we know in common
<http://www.linkedin.com/e/wwk/29505421/?hs=false&tok=0zCreXIp0dhRQ1>Want a
signature like this?
<http://www.linkedin.com/e/sig/29505421/?hs=false&tok=1-_hPrm6YdhRQ1>