+ 1

how to solve ? Как решить ? Python

Написать метод/функцию, который/которая на вход принимает число (float), а на выходе получает число, округленное до пятерок. Write a method / function that accepts a number (float) as input, and receives a number rounded to five at the output.

9th Oct 2021, 11:31 PM
Xameleona
Xameleona  - avatar
3 Respostas
+ 4
Why don't you just Google "Python round"? The first result is https://www.w3schools.com/python/ref_func_round.asp
10th Oct 2021, 8:41 AM
David Ashton
David Ashton - avatar
+ 3
You could use % (modulo operator) to solve this problem quite easily.
9th Oct 2021, 11:35 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 1
Xameleona What have you tried so far? Please post your attempt so we may assist better Rounded to 5? Is that rounded to the nearest 5, or rounded to 5 decimal places
10th Oct 2021, 2:58 AM
Rik Wittkopp
Rik Wittkopp - avatar