Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago