Module: (Python) Arithmetic expressions


Problem

6 /6


Integer division

Theory Click to read/hide

Result The division operation ("/") in Python can be a non-integer number or, as they say in programming, a real one. Often we need to get the integer and remainder of division. For example, we know the length of an object in centimeters and we need to find out how many whole meters it is and how many centimeters remain.
For instance:
435 centimeters = 4 meters 35 centimeters
This can be achieved if the number 435 is divided entirely by 100, that is, the integer part of the division by 100
35 centimeters can be obtained if we take the remainder of dividing 435 by 100.
In such cases, use the following operations
// - division completely
% - remainder of the division

The program can be written as follows:

length = 435
m = length // 100
cm = length % 100
REMEMBER
Integer division operations
1
   // - division completely
  % - remainder of the division

Problem

The movie duration in minutes is known.
Display this duration as hours: minutes

Examples:
Input

135
Output
2:15