Grade 11 - Pseudocode to Flowchart Exercise
Pseudocode to Flowchart Exercise
Write the pseudocode and make a flowchart for the following program descriptions.
Program 1
The program will (1) ask for the user’s name, then (2) print HI and the name. The program will then (3) ask what year the user was born, (4) calculate the age, and (5) print the age. (6) If the student is over 21, the program will (7) print YOU ARE AN ADULT!
Program 2
The program will (1) choose two random numbers, then (2) print them out as an addition problem. The program will then (3) ask the user to (4) enter the correct answer. (5) If the answer is correct, the program will (6) print RIGHT. (6) If the answer is wrong, the program will (7) print NO, THE ANSWER IS and the correct answer.
Program 3
The goal of the program is to take in several numbers and print the average. Each number will come in one at a time. Each time a number comes in, the computer will have to add it to the running total and add one to the “number of numbers” so the average can be calculated. This process will need to be repeated until the user is finished entering all the numbers. At the end, the average must be calculated and printed. There will have to be a way for the computer to tell whether or not there is another number coming in or whether it should print the average. NOTE: You can show “looping” (repeating) on a flowchart or the pseudocode by just drawing a line with an arrow.
Brainstorm on the steps needed to make this happen. Write the “pseudocode” and (if you dare) try the flowchart.
nice work bro
ReplyDeletethx. try this with the steps given.
ReplyDelete