DUMMY
Create a program to code the bisection method. Use the example f(x) = x3 – 3x – 4 with your left starting value of 1 and your right starting value of 3. Your program should end when |fmid| < tol where tol = 0.01. count how many times it took for the bisection to run before it finishes with your answer.to evaluate f(x) you must use a function call. for this week's discussion, please write a runnable example code showing inheritance and explain your code. example (for reference, doesn't have to be similar.) code class dog: def __init__(self, first_name, fav_place="doggy park"): self.first_name = first_name self.fav_place = fav_place def bark(self): print("woof woof!!!") class puppy(dog): def __init__(self, first_name, fav_place="living room", fav_food="puppy snack"): self.first_name = first_name self.fav_place = fav_place self.fav_food = fav_food def bark(self): print("woof woof") spot = puppy("spot") print(spot.first_name + " says ", end="") spot.bark() champ = dog("champ") print(champ.first_name + " says ", end="") champ.bark() output spot says woof woof champ says woof woof!!! explanation dog is the parent class and puppy is the child class. the parent class is passed as a parameter into the child class. puppy class is overriding bark method from the parent class to have smaller barks. spot is our puppy object. champ is our dog object. when printed, spot barks with lower cases and champ barks with all caps. how will this be graded? if you submitted something before the due date: +2 if you included the runnable example code: +4 if you included an explanation of what's happening in your code: +2 if you commented on 2 other student's posting: +2 out of a total of 10 points. tol="" where="" tol="0.01." count="" how="" many="" times="" it="" took="" for="" the="" bisection="" to="" run="" before="" it="" finishes="" with="" your="" answer.to="" evaluate="" f(x)="" you="" must="" use="" a="" function="" call.="" for="" this="" week's="" discussion,="" please="" write="" a="" runnable="" example="" code="" showing="" inheritance="" and="" explain="" your="" code.="" example="" (for="" reference,="" doesn't="" have="" to="" be="" similar.)="" code="" class="" dog:="" ="" def="" __init__(self,="" first_name,="" fav_place="Doggy Park" ):="" ="" ="" self.first_name="first_name" ="" ="" self.fav_place="fav_place" ="" ="" def="" bark(self):="" ="" ="" print("woof="" woof!!!")="" class="" puppy(dog):="" ="" def="" __init__(self,="" first_name,="" fav_place="Living Room" ,="" fav_food="puppy snack" ):="" ="" ="" self.first_name="first_name" ="" ="" self.fav_place="fav_place" ="" ="" self.fav_food="fav_food" ="" ="" ="" def="" bark(self):="" ="" ="" print("woof="" woof")="" spot="Puppy("Spot")" print(spot.first_name="" +="" "="" says="" ",="" end="" )="" spot.bark()="" champ="Dog("Champ")" print(champ.first_name="" +="" "="" says="" ",="" end="" )="" champ.bark()="" output="" spot="" says="" woof="" woof="" champ="" says="" woof="" woof!!!="" explanation="" dog="" is="" the="" parent="" class="" and="" puppy="" is="" the="" child="" class.="" the="" parent="" class="" is="" passed="" as="" a="" parameter="" into="" the="" child="" class.="" puppy="" class="" is="" overriding="" bark="" method="" from="" the="" parent="" class="" to="" have="" smaller="" barks. ="" spot="" is="" our="" puppy="" object.="" champ="" is="" our="" dog="" object.="" when="" printed,="" spot="" barks="" with="" lower="" cases="" and="" champ="" barks="" with="" all="" caps.="" how="" will="" this="" be="" graded?="" if="" you="" submitted="" something="" before="" the="" due="" date:="" +2="" if="" you="" included="" the="" runnable="" example="" code:="" +4="" if="" you="" included="" an="" explanation="" of="" what's="" happening="" in="" your="" code:="" +2="" if="" you="" commented="" on="" 2="" other="" student's="" posting:="" +2="" out="" of="" a="" total="" of="" 10=""> tol where tol = 0.01. count how many times it took for the bisection to run before it finishes with your answer.to evaluate f(x) you must use a function call. for this week's discussion, please write a runnable example code showing inheritance and explain your code. example (for reference, doesn't have to be similar.) code class dog: def __init__(self, first_name, fav_place="doggy park"): self.first_name = first_name self.fav_place = fav_place def bark(self): print("woof woof!!!") class puppy(dog): def __init__(self, first_name, fav_place="living room", fav_food="puppy snack"): self.first_name = first_name self.fav_place = fav_place self.fav_food = fav_food def bark(self): print("woof woof") spot = puppy("spot") print(spot.first_name + " says ", end="") spot.bark() champ = dog("champ") print(champ.first_name + " says ", end="") champ.bark() output spot says woof woof champ says woof woof!!! explanation dog is the parent class and puppy is the child class. the parent class is passed as a parameter into the child class. puppy class is overriding bark method from the parent class to have smaller barks. spot is our puppy object. champ is our dog object. when printed, spot barks with lower cases and champ barks with all caps. how will this be graded? if you submitted something before the due date: +2 if you included the runnable example code: +4 if you included an explanation of what's happening in your code: +2 if you commented on 2 other student's posting: +2 out of a total of 10 points.>