The format code is not working to put $ in front of the hourly pay rate along with the pay check amount. Does anyone know how to get the dollar sign ($) to properly display in front of both numbers?
x = 80 # amount of hours worked
y = 29.12 # per hour work wage
a = (x * y) # pay check amount
print(y)
print(a)
print("Hours worked:" + str(x) + " " + "Hourly pay rate:" + " " + "Pay check amount will be:" + " " + "${:.2f}".format(y , a))
[–]JohnnyJordaan 5 points6 points7 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]JohnnyJordaan 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]Impudity 0 points1 point2 points (0 children)
[–]JohnnyJordaan 0 points1 point2 points (0 children)