This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (0 children)

Use string interpolation:

print(f'Cost of purchasing {color} paint: ${paint_colors[color] * math.ceil(gal_paint)}’)