Prompt
Answer
Pseudocode for Calculating Average Score
Purpose
This program captures user input including their ID, scores in two subjects, and computes the average score. It then outputs these details along with the calculated average.
Steps
Prompt User for Input
- Request the user's ID number.
- Request the user's score in "Problem Solving & Programming".
- Request the user's score in "Computer Architecture".
Calculate Average Score
- Compute the average of the two scores provided.
Output Results
- Display the user's ID number.
- Display the user's score in "Problem Solving & Programming".
- Display the user's score in "Computer Architecture".
- Display the calculated average score.
Pseudocode
BEGIN
// Step 1: Prompt User for Input PRINT "Please Enter your ID number: " INPUT user_id
PRINT "Enter your score in Problem Solving & Programming: " INPUT score_problem_solving
PRINT "Enter your score in Computer Architecture: " INPUT score_computer_architecture
// Step 2: Calculate Average Score SET average_score = (score_problem_solving + score_computer_architecture) / 2
// Step 3: Output Results PRINT "ID: " user_id PRINT "Score in Problem Solving & Programming: " score_problem_solving PRINT "Score in Computer Architecture: " score_computer_architecture PRINT "AVERAGE SCORE: " average_score
END
Explanation
- User Input: The program first asks for the ID number and scores in two subjects. This information is stored in appropriate variables (
user_id
,score_problem_solving
, andscore_computer_architecture
). - Average Calculation: The program computes the average of
score_problem_solving
andscore_computer_architecture
by summing these two values and dividing by 2. - Output Display: The program prints the gathered ID and scores, followed by the calculated average score.
This pseudocode ensures clarity and step-by-step understanding, making it straightforward for translating into actual code in any programming language.
Description
This program collects user ID and scores from two subjects, calculates the average, and displays the user's details along with the computed average score, ensuring an easy understanding of the process.