Question: I'm stuck at this error import numpy as np +0 # Your solution def CalculateProb(prob, numDays, sepparios): # creating a function to check the probability

I'm stuck at this error

I'm stuck at this error import numpy as np +0 # Your

import numpy as np +0 # Your solution def CalculateProb(prob, numDays, sepparios): # creating a function to check the probability of you buying the tea collectid 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)) TypeError Traceback (most recent call last) Cell In [6], line 20 probability = buyTeaProb / sceanrios return probability 20 print (CalculateProb(0. 37, 7, 10)) Cell In [6], line 10, in CalculateProb(prob, numDays, scenarios) mugPurchase = False for day in range(numDays) ; if mugPurchase (prob): mugPurchase = True 13 if mugPurchase: TypeError: "bool' object is not callable

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!