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, 22.06.2019 03:30
Identify at least three types of characteristics that you were asked about as you the computer identify a fruit.
Answers: 3
question
Computers and Technology, 22.06.2019 11:10
Look at the far left lane in the picture. explain what the red car is doing and what it needs to do to travel safely.
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
Write a program that reads a file consisting of students’ test scores in the range 0–200. it should then determine the number of students having scores in each of the following ranges: 0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200. output the score ranges and the number of students. (run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189.)
Answers: 3
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
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, 17.07.2020 08:01