0

Codify a Day Planner

Hi All, I'm working my way through learning python, and I'd like some help. I'm challenging myself to turn this algorithm into a working program: Goal: Turn the bellow program into an actual python program #writing a program to test to see what we do today if TheWeatherIsGood: GoForAWalk() elif TicketsAvailable: GoToATheatre() elif TableAvailable: GoForLunch() else: PlayChessAtHome() Algorithm: 1. Ask the user what the weather is like 2. If the weather is good (ie not raining), then run GoForAWalk 3. IF the weather is bad, check to see if there are tickets available to go GoToATheatre 4. If no tickets, check for TableAvailable, and GoForLunch at a restaurant 5. If 1-4 are false, PlayChessAtHome GoForAWalk() <--- I think this needs to be a function, or weatherisgood is a function, not just a variable Ideas?

27th May 2020, 7:01 PM
Albert LeBlanc
Albert LeBlanc - avatar
2 Réponses
0
Explosive Creativity :D That is better than what I came up with :D
27th May 2020, 7:13 PM
Albert LeBlanc
Albert LeBlanc - avatar