I have imported cs50 module and am using cs50.get_float to store user input for greedy.py. I am having trouble with the floats to ints in Python. In C, we converted the float in cents by multiplying by 100 and then rounding using the round() function.
I know there is no comparable function in Python to round(), but I can't even multiply the float by 100 and not get rounding errors. I know why this occurs, I just don't know where to go from here.
Searching the web, I have seen tons of discussions about input() as a string and so forth, using complex ways to convert to int from float, etc. There has to be an easier way!
Anywhere I can find the answer in the Python documentation?