+ 3

What's the error in this program ?

Problem: https://www.sololearn.com/coach/22?ref=app Answer: canvas = 40 color = int(input()) color_price = color*5 total = canvas + color_price tax = total/10 to_pay = total+tax print (int(to_pay))

7th Oct 2024, 8:01 PM
Himawari
Himawari - avatar
5 ответов
+ 3
#you can just copy paste this code and for future doubts u can ask chatgpt n = int(input()) print(round((40 + 5*n)*1.1))
8th Oct 2024, 5:45 AM
Distraction(Rightraction)
Distraction(Rightraction) - avatar
+ 2
Himawari the task has a specific rounding requirement: "Output format A number that represents the cost of your purchase rounded up to the nearest whole number." To round up you can import math and use the math.ceil() function.
7th Oct 2024, 10:37 PM
Brian
Brian - avatar
+ 2
Okk Distraction(Rightraction), Brian thanks alot to both of you for helping 🤌❤️
8th Oct 2024, 12:13 PM
Himawari
Himawari - avatar
+ 2
Okk sir 👍👍 Distraction(Rightraction)
8th Oct 2024, 1:14 PM
Himawari
Himawari - avatar
+ 1
Himawari type/code less its python not c
8th Oct 2024, 12:16 PM
Distraction(Rightraction)
Distraction(Rightraction) - avatar