+ 1
I tried solving a code coach problem but the test cases are not agreeing with me yet i believe am correct help please
Code coach
5 Antworten
+ 2
import math
and
print (math.ceil(totalcost ))
remove "enter no of colors you..."
only input()
nocolors =int( input())
+ 5
The task description says that the total cost of the purchase has to be rounded up to nearest whole number. This is not done in your code.
+ 2
how can anyone help you without the code you wrote or what code coach you had a problem with ?
could you post your code.
+ 1
nocolors = int(input("Enter no of colors you want to purchase: \n"))
costcolor = nocolors * 5
canbru = 40
tax = (costcolor + canbru) * 0.1
totalcost = costcolor + canbru + tax
print (totalcost)
#nocolors = number of colors one wants to purchase
#costcolor = total cost of colors one wants to buy
#canbru = total cost of canvas and brushes
#tax = tax of the store
#totalcost = the cost of everything
+ 1
Thank you guys