Prerequisites: Basic course part I
Say there is a 1% chance of winning on a lottery ticket. It is then easy to think that if we buy 100 tickets, we will almost certainly win on some ticket. Or that we buy 1000 tickets and the probability of winning on each ticket is 1/1000 = 0.001 (0.1%). Then it's almost certain we win, right? Or what is the probability really?
Your task is to calculate the probability of winning if you buy n lottery tickets and the probability of winning on one ticket is 1/n.
The only input from the user is the integer n, and the only output is the probability of at least one win. Round the answer to four decimal places using round(p,4).
PS. If you have learned about the number e, calculate 1 - 1/e and compare with the result for a large n in this task.
-- Output from your program will be here --