View the step-by-step solution to:


This is a practice question intended to help with a course whos grade break down is 5 quizes. this is not to be

submitted, and is for my own education benefit

practice making a python program that uses random number generation to create sentences. The program should use four lists called article, noun, verb, and preposition. The program should produce a sentence by selecting a word at random from each array in the following order: article, noun, verb, preposition, article, and noun. As each word is picked, it should be concatenated to the previous words. The words should be separated by spaces. When the final sentence is output, it should start with a capital letter and end with a period. The program should generate 20 such sentences. After the preceding program is written and working, modify the program to produce a short story consisting of several of these sentences. 

Screen Shot 2019-10-02 at 1.10.01 PM.png

sorry i attached the lists via screen shot, it wasn't copy and pasting properly.

Screen Shot 2019-10-02 at 1.10.01 PM.png

article = [’the’, ’a’, ’one’, ’some’, ’any’]
noun = [’boy’, ’girl’, ’dog , ’town’, ’car’]
verb = [’drove’, ’jumped’, ran’, ’walked’, ’skipped’] preposition = [’to’, ’from’, ’over’, ’under’, ’011’]

Top Answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question