"Luke Paireepinart" <rabidpoob...@gmail.com> wrote

 print "The area of a " + Choice + "is " str(Width) + " x " +
str(Height) + " equals " + str(Width * Height) + " square feet"

One thing - you don't need all the str() calls in your example, print
already calls str() for you. Also comma separators are better than + signs

 print actually doesn't call str if you use concatenation.  So the str()
calls are necessary if you do not use "," but use "+" instead.

Good catch! - you are, of course, right. When you use + print only
sees a big single string with all the str() conversions already
done. I was thinking of the more usual comma separated
arguments to print

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to