Draw a flowchart of the algorithm calculating how many steps the player can guess a 4-digit number randomly generated by the system

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Draw a flowchart of the algorithm calculating how many steps the player can guess a 4-digit number randomly generated by the system.
Your algorithm is expected to print TIP information about the number predicted in each round.
About the Game: You are expected to design a single-player summer-draw game. It is a game based on the user guessing the random number generated by the system. The first digit of the generated number cannot be zero and the same digit can only be found once in the number (It should be assumed that the RANDOMLY GENERATED NUMBER was produced in accordance with this RULE. There is no need for any control process.).
The number of digits in both the generated number and the predicted number and in the same digit (that is, the correct place) is expressed as PLUS; The number of digits in both but in different digits (incorrect location) is expressed as MINUS.
For example, suppose the randomly generated number is 2483, and the guess made by the user is 8253. In this case, there is only one digit that has two numbers in common and is correctly placed (3). The number of digits common to both numbers, but with the wrong place, is two (2 and 8). Accordingly, the system that generated the number 2483 should say "PLUS 1, MINUS 2" as a hint to the user who guessed 8253. If there is no common digit between the guess and the generated number, the clue is called ZERO.
Note: It should be assumed that the generated number is correctly generated by the system. The rand(number) expression should be used inside the INPUT block to show that the number is randomly generated in the flowchart.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY