subject

This function must have the following header: def my_datetime(num_sec). This function takes in an integer value that represents the number of seconds since the epoch: January 1st 1970. The function takes num_sec and converts it to a date and returns it as a string with the following format: MM-DD-. It has the following specifications: It may be assumed that num_sec will always be an int value
It may be assumed that num_sec will always be a positive value
Must be able to handle leap years
Some examples:
my_datetime(0) returns 01-01-1970
my_datetime(123456789) returns 11-29-1973
my_datetime(9876543210) returns 12-22-2282
Your function handle all the computation itself. You are not permitted to use any library that can convert seconds to a date. This includes, but is not limitted to:
datetime
arrow
moment
maya
delorean
freezegun

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
What role do chromosomes play in inheritance?
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
The salespeople at hyperactive media sales all use laptop computers so they can take data with them on the road. you are a salesperson for superduper lightspeed computers talking to hyperactive media sales about upgrading the laptops to windows 10. explain how network location awareness in windows 10 would make the laptops more secure.
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
What is a programming method that provides for interactive modules to a website?
Answers: 1
You know the right answer?
This function must have the following header: def my_datetime(num_sec). This function takes in an in...
Questions
question
Mathematics, 06.01.2020 08:31
Questions on the website: 13722362