subject

Write a sixth game program that can play tic tac toe. This game displays the lines of the tic tax toe game and prompts the player to choose a move. The move is recorded on the screen and the computer picks his move from those that are left. The player then picks his next move. The program should allow only legal moves/. The program should indicate when there is a winner and tell who won. The player is then asked if he would like to play again. If the game is played the second time the computer is first to move. The player and computer take turns being first' player is then asked if he would like to play again. A sample output is shown in the attached file.
Tic_tac_toe game This game is played between you and the computer.
You move first and the computer will then move.
Play continues until you or the computer wins or it is a "cat's" game.
1 2 3
A ___|___|___
B ___|___|___
C | |
Please enter your move.
a1
1 2 3
A _X_|___|___
B ___|___|___
C | |
Computer makes a move.
1 2 3
A _X_|_O_|___
B ___|___|___
C | |
Please enter your move. b2
1 2 3
A _X_|_O_|___
B ___|_X_|___
C | |
Computer makes a move.
1 2 3
A _X_|_O_|___
B ___|_X_|___
C | | O
Please enter your move.
b1
1 2 3
A _X_|_O_|___
B _X_|_X_|___
C | | o
Computer makes a move.
1 2 3
A _X_|_O_|___
B _X_|_X_|___
C o | | O
Please enter your move.
b3
Congratulations you won!!
1 2 3
A _X_|_O_|___
B _X_|_X_|_X_
C o | | O
Would you like to play Tic-Tac-Toe again?
(yes/no)
Game 6 - due date FiveDigitNumber class - Write a sixth game program using the random number generator to generate a five-digit number. The player guesses the number. With each guess the computer returns two numbers, the first is the number of digits that are in the proper position and the second is the sum of the correct digits. Allow the client to repeat the game as many times as she wishes. Guarantee the numbers entered are 5 digit numbers. A sample output is shown in the attached file.
Using the random number generator, this game creates a
five-digit number. The player guesses the number.
The computer returns two numbers, the first is the number
of digits that are in the proper position and the second
is the sum of the correct digits guessed so far.
The player continues guessing untill she gueses the correct number.
Please enter the number you would like to guess.
24834
You have found 1 digits so far with a sum of 8.
Please enter the number you would like to guess.
26845
You have found 2 digits so far with a sum of 14.
Please enter the number you would like to guess.
56856
You have found 3 digits so far with a sum of 19.

Please enter the number you would like to guess.
56867
You have found 3 digits so far with a sum of 19.
Please enter the number you would like to guess.
56878
You have found 3 digits so far with a sum of 19.
Please enter the number you would like to guess.
56889
You have found 4 digits so far with a sum of 27.
Please enter the number you would like to guess.
56880
It took 7 guess to get the number 56880.
Would you like to play the game again?
Please enter (yes/no)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:40
Access defaults to searching for information on the
Answers: 1
question
Computers and Technology, 22.06.2019 12:30
What characteristic of long period comets suggest they come directly from the oort cloud?
Answers: 2
question
Computers and Technology, 22.06.2019 22:40
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Which of the following tasks is an audio technician most likely to perform while working on a nature documentary? (select all that apply). eliminating potentially distracting background noise adding sound effects making sure the lighting is adequate for a particular scene changing the narration to better match the mood of the documentary
Answers: 3
You know the right answer?
Write a sixth game program that can play tic tac toe. This game displays the lines of the tic tax to...
Questions
question
Mathematics, 07.12.2021 01:10
question
Mathematics, 07.12.2021 01:10
question
Mathematics, 07.12.2021 01:10
Questions on the website: 13722367