Purchase Solution

Bash script to compute the letter grade from test scores

Not what you're looking for?

Ask Custom Question

The Bash script must display the students letter grade based on the numeric average of combined test scores. The script should prompt user to enter numeric grades (test scores). Apply the loop structure to the portion of the script where the user is asked to enter the numeric grades. The script should also display the current date and time in Knoppix Linux.

Update the given script for above requirements, and also give a pseudo code for the script logic.

The appropriate letter grade for the number grade, should be computed using this scale:
90 to 100: Display a letter grade of "A"
80 to 89: Display a letter grade of "B"
70 to 79: Display a letter grade of "C"
65 to 69: Display a letter grade of "D"
0 to 64: Display a letter grade of "F"

Purchase this Solution

Solution Summary

The Bash script in the solution uses a while loop to read numeric grades for the student. It also makes use of HERE document concept of shell scripting.

Solution Preview

The attached script 145964.sh reads 5 numeric grades one at a time, and rounds the average down or up to nearest integer value. For ex. "6 < avg < 6.5" will result in rounding down of avg to 6 and "6.5 <= avg < 7" will result in rounding up of avg to 7.

Pseudo code for the script logic :

1. Display welcome and other initial messages about the script.
2. Display a message to enter 'Number of students' and read ...

Purchase this Solution


Free BrainMass Quizzes
Basic Networking Questions

This quiz consists of some basic networking questions.

C# variables and classes

This quiz contains questions about C# classes and variables.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Javscript Basics

Quiz on basics of javascript programming language.