Question: how to use python 2.7 to write a function it takes a list of strings as parameters, the list has formate list_to_story =[str1, prompt1, str2,

how to use python 2.7 to write a function it takes a list of strings as parameters, the list has formate list_to_story =[str1, prompt1, str2, prompt2, str3], 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 list could be any size, but at list have list_to_story = [str1, prompt1].

it could be list_to_story = [str1, prompt1], list_to_story = [str1, prompt1,str2,prompt2], list_to_story =[str1, prompt1, str2, prompt2, str3] .........,

how to use python 2.7 to write a function it takes a

str1 = "I 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 storyv)) >>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!