Question: IN PYTHON Read in a list of names, past tense verbs and fruits and randomly create sentences. Run the I/O to see how the output

IN PYTHON

Read in a list of names, past tense verbs and fruits and randomly create sentences. Run the I/O to see how the output should be displayed.

# PLACE ANY NEEDED IMPORT import random

# END OF IMPORT STATEMENTS

# DEFINE YOUR FUNCTIONS (NOT INCLUDING MAIN) IN THIS SECTION # END OF FUNCTION DEFINITIONS

# MAIN PART OF THE PROGRAM -- DON'T CHANGE ANYTHING IN MAIN! def main(): seed = int(input()) print("The seed is", seed) names,verbs,fruit = getData() print("NAMES:", names) print("VERBS:", verbs) print("FRUIT:", fruit) random.seed(seed) for i in range(10): n = pick(names, random.randint(1,1000)) v = pick(verbs, random.randint(1,1000)) f = pick(fruit, random.randint(1,1000)) print(n,v,"the",f) # INCLUDE THE FOLLOWING 2 LINES, BUT NOTHING ELSE BETWEEN HERE if __name__ == "__main__": main() # AND HERE

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!