Question: can't get past this error. what am I doing wrong. [83]: import numpy as np # Your solution def CalculateProb(prob, numDays, scenarios): # creating a

can't get past this error. what am I doing wrong.

can't get past this error. what am I doing wrong. [83]: import

[83]: import numpy as np # Your solution def CalculateProb(prob, numDays, scenarios): # creating a function to check the probability of you buying the tea collecti buyTeaProb = 0 for _ in range(scenarios): # checking if the mug was purchased before reaching the amount of days until pay cheque mugPurchase = False for day in range(numDays): if mugPurchase(prob): mugPurchase = True if mugPurchase: buyTeaProb += 1 # adds 1 to the buyTeaProb counter probability = buyTeaProb / sceanrios return probability print(calculateProb(0.37, 7, 10)) NameError Traceback (most recent call last) Cell In [83], line 6 3 def CalculateProb(prob, numDays, scenarios): # creating a function to check the probability of you buying the tea collection buyTeaProb = 0 6 for _ in range( scenarios): # checking if the mug was purchased before reaching the amount of days until pay cheque mugPurchase = False 9 for day in range(numDays) : NameError: name 'scenarios' is not defined

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!