Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that plays a word game with the user. The program should ask the user to enter the following: - His or her

image text in transcribed
image text in transcribed
Write a program that plays a word game with the user. The program should ask the user to enter the following: - His or her name - The name of a city - His or her age - The name of a college - A profession - A type of animal - A pet's name After the user has entered these items, the program should display the following story, inserting the user's input into the appropriate locations: There once was a person named name who lived in city. At the age of age, name went to college at college. name graduated and went to work as a profession. Then, name adopted a(n) animal named petname. They both lived happily ever after! The following sample run shows the expected output of the program. The user's input is shown in bold. Notice the wording of the output and the placement of spaces and punctuation. Also notice that we have shown characters to indicate where your program should print newlines. Your program's output must match this. Enter name: Al Smith Enter city: Brooklyn Enter age: 43 Enter college: School of Hard Knocks Enter profession: Politician Enter animal: Pitbull Enter pet name: Toodles There once was a person named Al Smith who lived in Brooklyn.a At the age of 43, Al Smith went to college at School of Hard Knocks., Al Smith graduated and went to work as a Politician. " Then, Al Smith adopted a(n) Pitbull named Toodles. A They both 11 ved happily ever after! d

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions