this post was submitted on 13 Jun 2025
7 points (81.8% liked)
General Programming Discussion
8655 readers
1 users here now
A general programming discussion community.
Rules:
- Be civil.
- Please start discussions that spark conversation
Other communities
Systems
Functional Programming
Also related
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
A real world problem that would help a real person
A friend coordinates a group of kayakers. Each week they kayak on Wednesday and Saturday mornings. To choose where to go they consult tide listings for the mouth of local creeks and rivers, then randomly select a site that meets a minimum tide height (the threshold is different for each site)
Ideally a Python project would:
Each location has:
Calculate the tide height for each location (calc on wikipedia) between 7am and 9am on each Wednesday and Saturday
Randomly select a location and time (that meets the threshold value, tide direction, and earliest start time) for each date
Choose a different location if the randomly chosen location was used as one of the previous x locations
Return the list of dates, times, locations, tide heights, and tide directions in a human readable format e.g. csv