Why isn't my code doing the math its supposed to do?

We’re not really sure what math is meant to be done. Can you describe what your objective is?

Note: You do not need the math module, from what we can see.

1 Like

Maybe its a string formatting thing.
Check whether
eggs_new = '{eggs{:,}}'
should be
eggs_new = '{:,}'.format(eggs)
or
eggs_new = f'{eggs:,}'
if you want an f-string.