I\'ve made a little script to calculator percent; however, I wish to actually include the \'%\' within the message printed...
Tried this at the start - didn\'t work.
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()
Sample Output:
Original Number: 0.25
Formatted Number with percentage: 25.00%
Original Number: -0.25
Formatted Number with percentage: -25.00%
Helps in proper formatting of percentage value
+++
Using ascii value of percentage - which is 37
print( '12' + str(chr(37)) )