Question: class HPError ( Exception ) : pass def hpMadLibs ( day , name, creature ) : if name ! = Voldemort: print ( It

class HPError(Exception):
pass
def hpMadLibs(day, name, creature):
if name != "Voldemort":
print("It was a sunny ", day, "at Hogwarts when ", name, "suddenly stopped and pointed toward the lake shore.")
print("'Look over there, I think a ", creature, "has escaped from Hagrid's collection!'", name, "shouted.")
else:
raise HPError
hpMadLibs("Tuesday", "Voldemort", "hippogriff")

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 Databases Questions!