Description
You are given a list of students names and their test scores. Design a pseudocode that does the following:
- Calculates the average test scores.
- Determines and prints the names of all the students whose test scores are below the average test score.
- Determines the highest test score.
- Prints the names of all the students whose test scores are the same as the highest test score.
You are to divide this problem into sub problems as follows:
- The first sub problem determines the average test score.
- The second sub problem determines and prints the names of all the students whose test scores are below the average test score.
- The third sub problem determines the highest test score.
- The fourth sub problem prints the names of all the students whose test scores are the same as the highest test score. The main pseudocode combines the solutions of the sub problems.
Question 2
Write a program that prompts the user to input a number of quarters, dimes, and nickels. The program then outputs the total value of the coins in pennies.
Question 3
Write a program, using case statements, that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the numbers, the operator, and the result. For division, if the denominator is zero, output an appropriate message.
Some sample outputs are as follow:
3 + 4 = 7
13 * 5 = 65
Question 4
Write a program that reads a set of integers and then finds and prints the sum of the even and odd integers.
Question 5
Write a program that uses while loops to perform the following steps:
- Prompt the user to input two integers: firstNum and secondNum (firstNum must be less than secondNum).
- Output all odd numbers between firstNum and secondNum.
- Output the sum of all even numbers between firstNum and secondNum.
- Output the numbers and their squares between 1 and 10.
- Output the sum of the square of the odd numbers between firstNum and secondNum.
- Output all uppercase letters.
Criteria | Needs Improvement | Satisfactory | Excellent | Points Possible |
Delivery | Completed fewer than 80% of the requirements Not delivered on time, or in the incorrect format | Completed most of the requirements Delivered on time, and in correct format | Completed 100% of the requirements. Delivered on time, and in correct format | 0-20 |
Coding Standards | Name, date, or assignment title missing Poor use of white space (indentation, blank lines) Disorganized and messy Poor use of variables (many global variables, unambiguous naming) | Includes name, date, and assignment title White space makes program fairly easy to read Organized work Good use of variables (some global variables, unambiguous naming) | Includes name, date, and assignment title Excellent use of white space Efficiently organized work Excellent use of variables (no global variables, unambiguous naming) | 0-20 |
Documentation | No documentation included | Basic documentation has been completed including descriptions of all variables Purpose is noted for each function | Clearly and effectively documented including descriptions of all variables Specific purpose is noted for each function, control structure, input requirements, and output results | 0-20 |
Execution | Program does not execute due to errors User prompts are misleading or non-existent | Executes without errors User prompts are understandable | Executes without errors Excellent user prompts, good use of symbols, spacing in output | 0-20 |
Solution Efficiency | Solution is difficult and inefficient | A logical solution that is easy to follow but is not the most efficient | Solution is efficient, easy to understand, and easy to maintain | 0-20 |
Explanation & Answer
Hey, it's done.. 😃 Make sure to put your name in the "Author" part in Q2-Q5Let me know if any issues/doubts.. 😃
Code:
MODULE main(argument: list_names, argument: list_scores):
SET average_score = calculate_average(argument: list_scores)
display_below_average(argument: list_names,argument: list_scores, argument: average_score)
SET highest_score = get_highest_score(argument: list_scores)
display_topper(argument: highest_score, argument: list_names, argu...