Python Exercise: Get next day of a given date
41. Next Day Calculator
Write a Python program to get the next day of a given date.
Sample Solution:
Python Code:
Output:
Input a year: 2012 Input a month [1-12]: 3 Input a day [1-31]: 5 The next date is [yyyy-mm-dd] 2012-3-6.
Flowchart :

For more Practice: Solve these Related Problems:
- Write a Python program to compute the next calendar date given a specific day, month, and year, considering leap years.
- Write a Python program to implement a function that returns the next day’s date in YYYY-MM-DD format.
- Write a Python program to calculate the following day of a given date using the datetime module.
- Write a Python program to manually compute the next date by incrementing day, month, and year with proper boundary checks.
Go to:
Previous: Write a Python program to find the median of three values.
Next: Write a Python program to calculate the sum and average of n integer numbers (input from the user). Input 0 to finish.
Python Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.