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) |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
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. |
|
|
|
 |
z_cross_fire

|
|
|
|
 |
|
|