Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help generating a random letter that is either D, A ,B ,O and the corresponding number. I can figure out the random number part
Need help generating a random letter that is either D, A ,B ,O and the corresponding number. I can figure out the random number part its the same as what i did for the board but i cant seem to get the random letter or get it to print the random letter and keep generating a new one each time i press enter. I have attached my code but dont need for it to go off what i have Operation The program should first display this board with the random numbers in each square as shown above. It should then continually prompt the user to "Press 'Enter' to generate a Square (or 'q' to quit).." Each time the user presses [Enter] the program should produce a randomly generated combination of a letter (D', A', 'B', or 'O') and a number valid to each column ('1' . 20' for D', 21'-40' for A' etc.) and display the result along with the counter that is incremented every time a letter-number combination has been generated for the game. For example: 1: D-7 2: 0-78 3: A-17 If the number generated is present on the board, then the program should display an X in that chosen cell and redraw the board
Need help generating a random letter that is either D, A ,B ,O and the corresponding number. I can figure out the random number part its the same as what i did for the board but i cant seem to get the random letter or get it to print the random letter and keep generating a new one each time i press enter. I have attached my code but dont need for it to go off what i have
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started