Example
Floor Division and Modulo
Operator // for floor division and % for remainder (modulo) in Python.
4 results
Example
Operator // for floor division and % for remainder (modulo) in Python.
Quiz
…the quiz covers The arithmetic operators + , - , * and / Floor division // and the remainder % , with practical uses Powers with ** and square roots Order of operations and brackets round() , abs()…
Challenge
…9 Tubes in the last crate: 4 Empty slots: 8 Rounding a division up is a classic trick: (tubes + slots_per_crate - 1) // slots_per_crate . Adding one tube less than a full crate pushes any leftover…
Challenge
Split 100,000 seconds of mission time into hours, minutes and seconds with // and %, pad it to a 27:46:40 clock, then add days in the DDD/HH:MM:SS format.