Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
-
answerhappygod
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Post
by answerhappygod »

- Exercise 8 2 Import Random Article The A One Some Any Noun Boy Girl Dog Town Car I 1 (29.2 KiB) Viewed 21 times

- Exercise 8 2 Import Random Article The A One Some Any Noun Boy Girl Dog Town Car I 2 (19.21 KiB) Viewed 21 times

- Exercise 8 2 Import Random Article The A One Some Any Noun Boy Girl Dog Town Car I 3 (9.39 KiB) Viewed 21 times
#Exercise 8.2 import random article = ['the', 'a', 'one', 'some', 'any'] noun = ('boy', 'girl', 'dog', 'town', 'car'i = verb = ['drove', 'jumped', 'ran', 'walked', 'skipped'] preposition = ['to', 'from', 'over', 'under', 'on'] for i in range(20): sentence - sentence=str(random.choice(article)) + ' ' + str(random.choice sentenceta'. print(sentence.capitalize())
(noun)) + ) + str(random.choice(verb)) + + str(random.choice(preposition)) + ' + (
(random.choice(preposition)) + str(random.choice (article)) + ' ' + str(random.choice(noun))
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!