+ 1

# Paint costs

I’m using python to solve a problem. You are getting ready to paint a piece of art. The canvas and brushes that you want to use will cost 40.00. Each color of paint that you buy is an additional 5.00. Determine how much money you will need based on the number of colors that you want to buy if tax at this store is 10%. Task Given the total number of colors of paint that you need, calculate and output the total cost of your project rounded up to the nearest whole number. Here is my code for the exercise: x=int(input()) y=(x*5+40)*1.1 print(y) How do I rounded the output to the nearest whole number?

4 Antworten

+ 6

#Try this
print(round(y))

+ 5

Your attempt

+ 2

+ 2

Thanks, everyone