(Solution) 12 ? ? ? ?( ? ? ?( ? ? ?( ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | Snapessays.com


(Solution) 12 ? ? ? ?( ? ? ?( ? ? ?( ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


Yes sir I came across your hang man program and I am very new to programming and I am trying to understand how I would apply my name (smallman )into the hangman program for week 4ÐÏ à¡± á

 

Ž

 

1ˆ2€

 

Œ

 

?¤ Œ

 

? ? ?(

 

? ? ?(

 

? ? ?(

 

? ? ?

 

? ? ?

 

? ? ?

 

? ? ?

 

? ? ?

 

? ? ?

 

? ? ?ÿÿÿÿ

 

IPO Chart:

 

Input Processing Output Letter

 

(Enter guesses one by one) Loop to allow the user to guess 10 times.

 

Check the letter is in the secret word or not. If the letter is in the

 

word, then display a message that the user guessed correctly.

 

Otherwise display a message that the user guessed incorrectly and

 

increment the score value. Stop the loop if the word is completly

 

guessed.

 

In every iteration:

 

Display a message that the guess is correct.

 

Display a message that the guess is incorrect.

 

Final:

 

Won the game.

 

Lost the game.

 

Algorithm:

 

read letter

 

loop for ten times to allow user to guess 10 times

 

if entered letter is in the secret word then display a message that

 

the guess is correct, else Display a message that the guess is

 

incorrect and increment the score. Stop the loop if the word is

 

guessed correctly.

 

if number of correct guesses if less than number of letters in the

 

word display lost the game, else display won the game

 

stop

 

Pseudo code:

 

begin:

 

declaration

 

noGuess=0, score=0, noCGuess=0, word[] = "SMALLman"

 

wLength, guessed, guessChar, found, n

 

loop from n=0 to wLength

 

guessed[n] = '*';

 

out"Welcome to the Hangman game!"

 

loop till user number of guesses is less than or equal to 10

 

read guessChar

 

noGuess = noGuess+1

 

loop from n=0 to wLength

 

if

 

word[n] is same as guessChar

 

found = true

 

guessed[n]=guessChar

 

noCGuess= noCGuess+1

 

if found is true

 

out"You guessed a letter correctly!"

 

else

 

out"You guessed incorrectly!"

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: May 23, 2022

Solution~00021147602016.zip (25.37 KB)


This attachment is locked

Our expert Writers have done this assignment before, you can reorder for a fresh, original and plagiarism-free copy and it will be redone much faster (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

May 23, 2022

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • ■ As a reference for in-depth understanding of the subject.
  • ■ As a source of ideas / reasoning for your own research (if properly referenced)
  • ■ For editing and paraphrasing.

This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

Get Free Price Quote