Class and its members used:
- Class : time
- Method : getTime() : takes input for hours, minutes and second from the user.
- Method : putResult() : converts that time into required format and prints it.
- Method : __add__() [addition operator ] : adds the respective values for both objects.
- Variable : d : store the count of days
- Variable : h : store the count of hours
- Variable : m : store the count of minutes
- Variable : s : store the count of seconds
Program to convert hours into days in Python
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer