Then, in the main function, take user inputs, compute the chance, and display it.
print(f"\nYour chance of a Hole-in-One is {chance:.2f}%") holeinonepangyacalculator 2021
Example code:
In reality, in many games, the probability of a Hole-in-One might be determined by certain stats. For example, maybe the player's accuracy, the strength of the club, the distance to the hole, terrain modifiers, etc. So the calculator could take these inputs and compute the probability. Then, in the main function, take user inputs,