Pseudo Code Generator

Average Score Calculator

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.


Empty image or helper icon

Prompt

Write a program that asks the user his id number (use a simple integer value), score in Problem solving & Programming and Computer Architecture and output the user’s name with his average score.
 Sample inputs: Please Enter your id number: 20240612
 Enter your score in Problem Solving & Programming: 65
 Enter your score in Computer Architecture: 75 …
 Sample outputs: id: 20240612
 Score in Problem Solving & Programming: 65 
Score in Computer Architecture: 75 
AVERAGE SCORE: 70

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

  1. 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".
  2. Calculate Average Score

    • Compute the average of the two scores provided.
  3. 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, and score_computer_architecture).
  • Average Calculation: The program computes the average of score_problem_solving and score_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.

Create your Thread using our flexible tools, share it with friends and colleagues.

Your current query will become the main foundation for the thread, which you can expand with other tools presented on our platform. We will help you choose tools so that your thread is structured and logically built.

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.