Welcome
Welcome to raptorflowchart

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

program to calculate a students average grade

Discuss and share code here. Working on something that you can't get right - post it here.

program to calculate a students average grade

Postby director » Wed Oct 19, 2011 4:30 pm

Okay, so I have this problem :( :cry: I have been working on this since 9 AM today and still cannot figure out how to do it.

Here is my problem:

I need to design a program to calculate a students letter grade on an exam. I am to run this problem with the numerical grades of 68, 71 and 80.

The MasterConsole should display: Your numerical grade is: ( the average of the three grades)
Your letter grade is: (A,B,C,D,or F)

The letter grades are based on this scale:

Numerical Grade Letter Grade
<60 F
>=60 and < 70 D
>=70 and < 80 C
>=80 and < 90 B
>=90 A


I have figured out how to get the three scores and find the average. This is what I have so far:

INPUT "What is your first test score?" Get test1

INPUT "What is your secound test score?" Get test2

INPUT "What is your third test score?" Get test3

Set average to (test1+test2+test3)/3

OUTPUT "Your numerical grade is"+average

I want to put this into a loop until I no longer need to input a grade. I have no clue how to do that :? I also for the life of me can not figure out how to display the letter grade for the average :? Like I have said, I have been working on this problem since 9 AM so it's not as if I am trying to get someone to do my work for me. I have honestly tried for hours.

UPDATE: I just figured it out :D :shock: :lol:

after my Set average to (test1+test2+test3)/3
I entered a Selection symbol that states average<60
IF yes PUT "Your numerical grade is " +average
PUT "Your letter grade is: F"

IF no it goes to another Selection symbol that states average<=60
IF yes PUT "Your numerical grade is " +average
PUT "Your letter grade is: D"

IF no it goes to another Selection symbol that states average<70
IF yes PUT "Your numerical grade is " +average
PUT "Your letter grade is: D"

IF no it goes to another Selection symbol that states average<=70
IF yes PUT "Your numerical grade is "+ average
PUT "Your letter grade is: C"

I continue to use the Selection symbol until I reach average>=90 then
IF no or IF yes it states PUT "Your numerical grade is " +average
PUT "Your numerical grade is: A"
director
 
Posts: 3
Joined: Tue Sep 27, 2011 6:06 pm

 

Re: program to calculate a students average grade

Postby dfcox » Fri Oct 21, 2011 2:00 pm

Congrats!
dfcox
Site Admin
 
Posts: 203
Joined: Wed Jun 30, 2010 1:32 pm


Return to RAPTOR programming discussions

Who is online

Users browsing this forum: No registered users and 0 guests

cron
suspicion-preferred