Project 53: NFL Regular Season
The Green Bay Packers and the Tampa Bay Buccaneers were tied for the best record in 2021, with a record of 13-4. Since the NFL has a hard salary cap, the talent level on NFL teams is fairly evenly distributed.
Project 53: Assume a certain NFL team has a 50% chance of winning every game. We want to estimate the probability the team would win 13 or more games out of 17 games played.
There is a working method called random. The method accepts no parameters (empty parentheses) and returns a random value from 0 to 1.
Example: random() yields a value in the interval [0, 1)
Task: Appropriately initialize the value of 'prob' that represents the probability that the team described (which has a 50% chance to win any game) would win at least 13 games out of 17 games played. Simulate MANY Trials (about 100,000) to obtain an accurate estimation.
**If your code works for 5 test cases, you can enter your e-mail address
Universal Computational Math Methods:
pow(5,2) returns 25.0
abs(-3.0) returns 3
sqrt(49.0) returns 7.0