#Exercise 8.2 import random article = ['the', 'a', 'one', 'some', 'any'] noun = ('boy', 'girl', 'dog', 'town', 'car'i =
Posted: Fri May 20, 2022 11:25 am
#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))
(noun)) + ) + str(random.choice(verb)) + + str(random.choice(preposition)) + ' + (
(random.choice(preposition)) + str(random.choice (article)) + ' ' + str(random.choice(noun))