Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions

Question

20.16 How does Honest Tea practise sustainable marketing?

Answered: 1 week ago