Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Write a program that plays a word game with the user

2.19: Word Game

Write a program that plays a word game with the user. The programshould

ask the user to enter the following:

  • His or her name
  • His or her age
  • The name of a city
  • The name of a college
  • A profession
  • 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 ofAGENAME went to college at COLLEGENAME graduated and went to work as a PROFESSION. Then, NAME adopted a(n) ANIMAL  namedPETNAME They both lived happily ever after!

Prompts And Output Labels: There are no labels here but the prompts should simply be (respectively) “Enter your name: “, “Enter your age: “, “Enter the name of a city: “, “Enter the name of a college: “, “Enter profession: “, “Enter a type of animal: “, “Enter a pet name: “. Note that each prompt ends with a “:” followed by one space and is displayed so that the response will appear on the same line as the prompt itself.

Input: Keep in mind that the input responses to the prompts may consist of multiple words. For example, name might be “John Jinkleheimer Schmidt”.

CLASS NAMES. Your program class should be called WordGame

2.4: Star Pattern

Write a program that displays the following pattern:

*

***

*****

*******

*****

***

*

Output. Seven lines of output as follows: The first consists of 3 spaces followed by a star. The second line consists of 2 spaces followed by a 3 stars. The third consists of one space followed by 5 stars, and the fourth consists just of 7 stars. The fifth line is identical to third, th sixth to the second and the seventh to the first.

CLASS NAMES. Your program class should be called StarPattern

Step-by-step answer

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"