#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))
#Exercise 8.2 import random article = ['the', 'a', 'one', 'some', 'any'] noun = ('boy', 'girl', 'dog', 'town', 'car'i =
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
#Exercise 8.2 import random article = ['the', 'a', 'one', 'some', 'any'] noun = ('boy', 'girl', 'dog', 'town', 'car'i =
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!