The Worksheet named Cuestion 1 contains a place for students to record the grades they have received in their dlasses. Students put the number of each letter grade received in the B column. (For example, the worksheet currently shows that the student has taken 9 classes and made five As, one B, one C, one D, and one F as grades. You need to write a program that reads the grades from the worksheet and uses a function to calculate the student's GPA. For this problem you can assume that all classes are worth the same number of credit hours. (See the note at the end of the test if you don't know how to calculate GPA...but you should know that, it's important to you!) The function should send back the GPA to the calling procedure. The procedure will then put upa message box that gives the student their GPA and a message about their GPA, all in one message box. The message should be "You qualify for an internship" if the student has a GPA over 3.0. It should be "You're in the danger zone" if the GPA is between 2.0 and 3.0. And it should be "You are on probation." if the GPA is less than 2.0. The message box below is an example of what should be shown to the user. Do not worry about the formatting of the GPA. I won't grade that. If yours has lots of decimal places, that is OK. Microsoft Excel Your GPA is 2.89. You're in the danger zone. OK
Types of Loop
Loops are the elements of programming in which a part of code is repeated a particular number of times. Loop executes the series of statements many times till the conditional statement becomes false.
Loops
Any task which is repeated more than one time is called a loop. Basically, loops can be divided into three types as while, do-while and for loop. There are so many programming languages like C, C++, JAVA, PYTHON, and many more where looping statements can be used for repetitive execution.
While Loop
Loop is a feature in the programming language. It helps us to execute a set of instructions regularly. The block of code executes until some conditions provided within that Loop are true.
Let's assume that credit hours is 1 hr for all the classes, so below is the logic of GPA
GPA = (Sum of the grade points obtained in all the classes * Credit of each class)/(Total Credit)
And let's assume if :
A is Grade then Grade point is 9 out of 10
B is Grade then Grade point is 8 out of 10
C is Grade then Grade point is 7 out of 10
D is Grade then Grade point is 6 out of 10
F is Grade then Grade point is 4 out of 10
To implement logic used button to display the message box.
Step by step
Solved in 2 steps with 1 images