. Continuously prompt the user to enter a word until the user enters q. 2. Store the entered words in a list 3. Making use of the random module, your program should call word_selection() that randomly selects a word from the list and prints it 4. Include the guard for the main function: if __name__ == '__main__': main()     Example: Enter a word (or ‘q’ to quit): Wallaby Enter a word (or ‘q’ to quit): Dingo Enter a word (or ‘q’ to quit): Platypus Enter a word (or ‘q’ to quit): q Wallaby

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter17: Linked Lists
Section: Chapter Questions
Problem 8PE
icon
Related questions
Question
1. Continuously prompt the user to enter a word until the user enters q.
2. Store the entered words in a list
3. Making use of the random module, your program should call
word_selection() that randomly selects a word from the list and prints it
4. Include the guard for the main function:
if __name__ == '__main__': main()
 
 
Example:
Enter a word (or ‘q’ to quit): Wallaby
Enter a word (or ‘q’ to quit): Dingo
Enter a word (or ‘q’ to quit): Platypus
Enter a word (or ‘q’ to quit): q
Wallaby
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage