79133285

Date: 2024-10-28 12:02:31
Score: 1
Natty:
Report link

The ceil() function only rounds up to integers. This work around can be adapted to round up to pennies. You can write a function to do that for you.

from math import ceil
payment = 3.1234
payment = 100 * payment
payment = ceil(payment)
payment = payment / 100
print(payment)
3.13
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: DogwoodRavine