The Student Room Group

A little help please(Python)

hello ! I am a beginner in learning Python and pardon me if the question is too much basic.

we use '/' to divide any integer and '//' to get the whole number in the quotient of division. '%' is used to get a reminder....but how can I get 12 if the result is 11.5 after using '/'?
Reply 1
I think you'll want to use the round function, but without knowing the full task you want I'm not sure why you don't want an accurate remainder. Also have a look at floor and ceil to see if they'll be better.

Quick Reply

Latest

Trending

Trending