Some times, while calculating, we need only the integer part of the earlier step for the next step.
The “floor” command gives the necessary effect. In the small example given below, we find the day number in an year if full date is given.
Here is the example code:
year=input(“Give year number: “)
month=input(“Give month number: “)
date=input(“Give date: “)
% n is day of the year