avatar Bite 153. Round a sequence of numbers

It's time to get mathematical! In this Bite we ask that you complete the round_up_or_down function that receives a transactions list of floats and an optional up argument.

If up is True (default) you round them up to the nearest full integer, if it is False, you round down to the nearest full integer. Return a new list with the rounded int values.

Use whatever method you see fit, good luck!

Login and get coding
go back Beginner level
Bitecoin 2X

360 out of 360 users completed this Bite.
Will you be Pythonista #361 to crack this Bite?
Resolution time: ~19 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 1.38 on a 1-10 difficulty scale.
» You can do it! 😌

Focus on this Bite hiding sidebars, turn on Focus Mode.
We use Python 3.8