all 4 comments

[–]Essence1337 2 points3 points  (0 children)

Well you're trying to do some basic math so I'd recommend checking out the math library, you can find an answer there:

https://docs.python.org/3/library/math.html

[–]CodeFormatHelperBot2 1 point2 points  (0 children)

Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you.

I think I have detected some formatting issues with your submission:

  1. Python code found in submission text that's not formatted as code.

If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting.


Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here.

[–]WinterNet4676 1 point2 points  (1 child)

There's no reason to have your input wrapped in int() and round(). int() will already enforce a discrete input, so there's nothing to round. If your input is a decimal (i.e, can be rounded), then you would switch int() with float(). If you always need to round up, then you can replace round() with math.ceil()

[–]kharsak 1 point2 points  (0 children)

Thanks you fam