What % means in this code and what does it do in this case.
Author |
Message |
CheapItalian
|
Posted: Sun Oct 09, 2011 11:30 pm Post subject: What % means in this code and what does it do in this case. |
|
|
print("Your Salary is $%0.2f" % amount)
print("The area is $%0.1f" % amount)
print("%7f" % amount) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Sun Oct 09, 2011 11:45 pm Post subject: RE:What % means in this code and what does it do in this case. |
|
|
string format. Look at the documentation for print for details. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
z_cross_fire
![](http://compsci.ca/v3/uploads/user_avatars/3363948104d4a38967c893.png)
|
|
|
|
![](images/spacer.gif) |
|
|