1,760
edits
Changes
→Program structure
* The tomorrow() function will take a date in "YYYYMMDD" format and return the date of the next day in the same format. Next paragraph is a sample python code for the tomorrow() function.
<pre>
#!/usr/sbin/env python3
import ...
def tomorrow(today):
....
return next_day
def yesterday(today):
....
return previous_day
....
if __name__ == __main__:
.. processing command line arguments ..
.. set loop based on the number of days given
.. call tomorrow() or yesterday() as appropriate
...
output the expected date
</pre>
=== Sample code for the tomorrow() function ===