[Tutor] [Re:] I need help with the following question

Thabile Rampa thabilerampa at gmail.com
Tue Sep 10 09:58:31 CEST 2013


On Aug 27, 2013, at 3:40 AM, isaac Eric wrote

<snip>
> print "For a circle of radius %s the area is %s" % (radius,area)
<snip>> Question: What is the purpose of %s ?

I will admit that this is homework for me. However, this is more for my log
book and not for marks.

According to my understanding, the purpose of the %s is to turn the numbers,
which the program has recognized as numbers, into strings, so that they fit
in the print command without any syntax errors.

Could you guide me in the right direction if it is completely off?

*Tab Tab*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130910/ae6cb36c/attachment.html>


More information about the Tutor mailing list