Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
What do round(3.14159, 2), round(9.99), abs(-12) and abs(5) give?
round() shortens a number. abs() gives its size without the sign.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, compare your working with the solution.
round(3.14159, 2) keeps two places after the decimal point: 3.14.round(9.99) rounds to the nearest whole number: 10.abs(-12) removes the minus sign: 12.abs(5) is already positive: 5.Answer: 3.14, 10, 12 and 5.
Log in to join the discussion.
Loading…