[Tutor] Needing Help

Bob Rea bob at telaugos.com
Tue Jun 30 20:06:01 CEST 2009


On Tue June 30 2009 1:17 pm, vishwajeet singh 
<dextrous85 at gmail.com>wrote:
> You can put your script in pastebin
> http://python.pastebin.com/
> <http://python.pastebin.com/>I don't think any one will
> mind you pasting code in mail but pastebin makes it
> easier to read

I am making my way through _Making Use of Python_ by Rashi 
Gupta. I am using Python 2.4.1 

I have run into problems in a script, listed at 
http://python.pastebin.com/m51bc3388

If I input my own name and dob, it works:
bob at gandalf:~/python/MakingUse/Chapter05> python code1.py
Enter your first name:  Bob
Enter your last name:  Rea
Enter your date of birth, mm-dd-yyyy:  03-05-1943
You can chose one of the following login names:
1.   BobR
2.   BobR53
3.   RBob43
4.   BRea66

If I use the data listed in the book, it fails:
bob at gandalf:~/python/MakingUse/Chapter05> python code1.py
Enter your first name:  Laura
Enter your last name:  Jones
Enter your date of birth, mm-dd-yyyy:  12-24-1980
You can chose one of the following login names:
1.   LauraJ
2.   LauraJ2412
3.   JLaura80
Traceback (most recent call last):
  File "code1.py", line 67, in ?
    fourth=fname[0]+lname+ age_func()
TypeError: cannot concatenate 'str' and 'NoneType' objects

What is going on here?

Bob Rea
petard at petard.us
-- 
Bob Rea
mailto:gapetard at stsams.org
http://www.petard.us
http://www.petard.us/blog
http://www.petard.us/gallery

Where is Bill Stringfellow
	now that we really need him?


More information about the Tutor mailing list