Write a program that takes a positive integer from the user and calculate the date from today. - Use the datetime python module to get today’s date - Use conditional statements to convert it to year, month and day in Gregorian calendar - Output: day of the week, week of the year, month, season and year. - **Assume all years have 365 days and all month have 30 days Sample input: >>> Today is February 22, 2022 >>> Enter a positive integer: 2535 Sample output: Year: 2029 Month and Season: January, Winter Week of the year: 5th week of the year Day of the week: Wednesday (If normal calendar rules) In the United States: 1/31/2029, anywhere else in the world 31/1/2029
Write a program that takes a positive integer from the user and calculate the
date from today.
- Use the datetime python module to get today’s date
- Use conditional statements to convert it to year, month and day in Gregorian calendar
- Output: day of the week, week of the year, month, season and year.
- **Assume all years have 365 days and all month have 30 days
Sample input:
>>> Today is February 22, 2022
>>> Enter a positive integer: 2535
Sample output: Year: 2029
Month and Season: January, Winter
Week of the year: 5th week of the year
Day of the week: Wednesday (If normal calendar rules)
In the United States: 1/31/2029, anywhere else in the world 31/1/2029
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images