Help

final = money(3,5)
print final
if final == 8:
print “whyyy” .center(54)
if final == 8:
print “true” .center(54)
print final * 3

so how would i get the print final* 3 to be in the middle right away when it prints. because when i click run it showes the answer(24) all the way to the left side. how can i get it to print in the middle.

If you want to use the .center() method, you’ll need to convert final * 3 to a string using the str() method, and then call the .center() method. This can all be done on one line:

#example:
print str(x * y).center(some_val)
3 Likes

thank you. It means a lot

2 Likes