Q:

Write a Python program to format a number with a percentage.

0

Write a Python program to format a number with a percentage.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

x = 0.25
y = -0.25
print("\nOriginal Number: ", x)
print("Formatted Number with percentage: "+"{:.2%}".format(x));
print("Original Number: ", y)
print("Formatted Number with percentage: "+"{:.2%}".format(y));
print()

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now