Space Python Loading Python…

Floor Division and Modulo

 
0:00 / 0:00

Challenge

Practise what this example shows with these challenges.

Duration formatter

Write the codeEasy 3 stages

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.

Start the challenge

Packing crates

Write the codeMedium 2 stages

Work out how many 12-slot crates 100 sample tubes fill with // and %, then how many crates they need and how full the last one is, including the case where the tubes fit exactly.

Start the challenge

Discussion

Stuck on this example or want to go further? Ask here, or see what others asked.

Log in to ask and reply.

script.py
PythonLn 1, Col 1Spaces: 4
Loading the Python environment…

Separate arguments with commas. They're passed on every Run as sys.argv[1:].