Question: Hello! I need help with this following Python question.. Thank you in advance! The cell below includes a function court_jester_jokes that has been provided for

Hello! I need help with this following Python question.. Thank you in advance!

Hello! I need help with this following Python question.. Thank you in

The cell below includes a function court_jester_jokes that has been provided for you. After understanding the code in the function, run the cell below (to define this function). Then, execute (use) this function to create the following variables under the specified conditions: 1. joke_random I execute the court_jester_jokes function to return a joke at random 2. joke_nonrandom I execute court_jester_jokes to return the second joke in joke_1ist 1 import random 2 3 def court_jester_jokes(random_joke=1'rue): 4 joke_list = ['A clown held the door open for me yesterday. I thought it was a nice jester' , 5 'How does the court jester address the King of Ducks? Mal'Lard', 6 'What did the court jester call the balding crown prince? The Heir Apparent with no Hair Apparent' 7 'What do you call a joke made by using sign language? A jester'] 8 if random_joke: 9 out_joke = random.choice(joke_list) 10 else: 11 out_joke = joke_list[1] 12 13 return out_joke

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!