Method 1 [8 pts]: Write a method called aprilFoolsPrank() th…

Written by Anonymous on April 15, 2026 in Uncategorized with no comments.

Questions

Methоd 1 [8 pts]: Write а methоd cаlled аprilFоolsPrank() that takes as input the name of a trick (str). If the trick exists in the shop's prankBag dictionary and isSneaky is True, apply an April fool discount by reducing the trickPrice of that trick by half. Return "Prank Power" if the discount is applied, otherwise return "No prank today"   Example Output 1:>>> shop1 = PrankShop("Lily", True)>>> shop1.updatePrices([("cushion", 10.0), ("Spider", 5.0)])>>> shop1.aprilFoolsPrank("cushion")"Prank Power">>> shop1.prices{"cushion": 5.0, "Spider": 5.0} Example Output 2: >>> shop2 = PrankShop("Bennie") >>> shop2.updatePrices([("cushion", 10.0), ("fakeTicket", 8.0)]) >>> shop2.aprilFoolsPrank("cushion") "No prank today" >>> shop2.prices {"Rose": 10.0, "fakeTicket": 8.0}  

Comments are closed.