- My Forums
- Tiger Rant
- LSU Recruiting
- SEC Rant
- Saints Talk
- Pelicans Talk
- More Sports Board
- Fantasy Sports
- Golf Board
- Soccer Board
- O-T Lounge
- Tech Board
- Home/Garden Board
- Outdoor Board
- Health/Fitness Board
- Movie/TV Board
- Book Board
- Music Board
- Political Talk
- Money Talk
- Fark Board
- Gaming Board
- Travel Board
- Food/Drink Board
- Ticket Exchange
- TD Help Board
Customize My Forums- View All Forums
- Show Left Links
- Topic Sort Options
- Trending Topics
- Recent Topics
- Active Topics
Started By
Message
re: Python programming?
Posted on 4/11/15 at 10:30 pm to dandug001
Posted on 4/11/15 at 10:30 pm to dandug001
First off your else doesn't need to test not equal, it can just print the date is not magic.
Second, are you required to validate the date? If so, there is surely a module to do it for you. If you aren't allowed to use modules, then you will have to check them manually, but that's not too hard. Just if month is 2, day has to be less than 30, if month is 4, 6, 9, or 11, day has to be less than 31, and the rest less than 32. And of course all have to be greater than 0.
Second, are you required to validate the date? If so, there is surely a module to do it for you. If you aren't allowed to use modules, then you will have to check them manually, but that's not too hard. Just if month is 2, day has to be less than 30, if month is 4, 6, 9, or 11, day has to be less than 31, and the rest less than 32. And of course all have to be greater than 0.
Popular
Back to top
Follow TigerDroppings for LSU Football News