I just trying to do python challenges. And part of one is cmd callendar looks that:
| M | T | W | Th | F | S | Su |
| | | 1 | 2 | 3 | 4 | 5 |
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | | | |
In this case, all months has 30 days. I need to do that in iterative way. I need to keep start day in variable. Start day should be 0-6 when 0 is Monday, and 6 is Sunday. For example, the month from example variable = 2.
I can't do that but i want to understand it. How can I do that in iterarive way?
I tried do that in another way, just using calendar library, but it's not the correct solution.
Can someone help me?
Aucun commentaire:
Enregistrer un commentaire