Question: Python in python thx For Example: Making a function call to convert_seconds() >>Enter the number of seconds you want to convert? >> corresponds to: days,

Python

Python in python thx For Example: Making a function call to convert_seconds()

in python thx

For Example: Making a function call to convert_seconds() >>Enter the number of seconds you want to convert? >> corresponds to: days, hours, minutes, seconds Part 2 In this part you will implement a function that generates a text given user inputs. generate story[...) The function takes a list of strings as parameters and returns a generated story by concatenating the list of strings and the user's input for the corresponding prompts.The format of the list that you pass in to your function is the following list-to-story = [str1, prompt!, str2, prompt2, str31 Your list will always start with a story and then followed by prompts and stories in the alternate format as shown above. Your list must atleast have one story and prompt i.e. list-to-story= [str1, prompt1] Here str1, str2, str3 are sentences that compose the story and prompt1, prompt2 are the questions you should ask to the user in your function. The answers provided by the user must be recorded and stored in your function. Finally you will return a string that is formed after concatenating str1, str2, str3 and prompt1 ans, prompt2_ans in the correct order For Example: Making a function call to generate_story(list to_story) str1 went skiing to prompt = 'Enter a location: , str2 = 'it was really crowded and I stayed in line for prompt = 'Enter number of hours str3 = 'hours. list-to-story = [str1 , prompt!, str2, prompt2, str31 print(generate_story(list to story)) >>Enter a location: Copper >Enter number of hours: 10 >>I went skiing to Copper it was really crowded and I stayed in line for 10 hours

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!