## Re: Number ranges

Expand Messages
• Also - looks as though a score of 60 qualifies as a D - in the range 60-69 ALSO qualifies as an F - less than 61. maybe the F grade is a score less than
Message 1 of 8 , Oct 31, 2005
• 0 Attachment
Also - looks as though a score of 60 qualifies as a "D" - in the
range 60-69 ALSO qualifies as an "F" - less than 61.

maybe the "F" grade is a score less than 60?

--- In libertybasic@yahoogroups.com, "bill" <majorwar@y...> wrote:
>
> Hi,
> I am a college student and I am new to Leberty Basic. I am
writing
> a program that is supposed to find the averages of three scores for
> 30 different students and print out a letter grade. The problem I
am
> having is that I am not sure how to put in a number range, IE. a
> letter grade of "B" is a number between 80 and 90. Any suggestions?
>
> REM Bill E
> rem Project Delta
> rem OCT 26 2005
> rem this program will take 3 grades per student,average them, and
> then provide an output with the name and letter grade for each
student
> rem VAR studentname\$= The array holding the student names
> rem VAR studentscore= The array holding the students average
> rem VAR student\$= The students namerem VAR c=counter
> rem VAR average = average of three scores
> rem VAR x=Variable number on counter
> rem clear screen
> cls
> rem Making the arrays
> dim studentname\$(30)
> dim studentscore(30)
> rem input student names
> input "Enter student name:" ; student\$
> while student\$ <> ""
> rem counter to tell us how many students we have processed
> let c = c+1
> cls
> input "Enter the first score:" ; score1
> cls
> input "Enter the second score:"; score2
> cls
> input "Enter the third score:"; score3
> let studentname\$(c) = student\$
> let average =(score1+score2+score3) /3
> let studentscore(c) =average
> cls
> input "Enter the next students name, or hit enter to
continue:";
> student\$
> wend
> cls
> for x = 1 to c
> BOOK "
> print "Student",
> BOOK "
> print "Student",
> next x
> end
>
> if studentscore(x) <61 then
> Else
> if studentscore(x) = 60 69 then
> END IF
> END IF
> if studentscore(x) = 70 79 then
> Else
> if studentscore(x) = 80 89 then
> END IF
> END IF
> if studentscore(x) >90 then
> Else
>
> END IF
> Return
>
• I actually figured this one out. In between each of those numbers I put = and it fixed my problem. Thanks!! ... __________________________________ Yahoo! Mail
Message 2 of 8 , Nov 2 8:51 AM
• 0 Attachment
I actually figured this one out. In between each of
those numbers I put >= and it fixed my problem.
Thanks!!

--- Joe <jj.jackson@...> wrote:

> Also - looks as though a score of 60 qualifies as a
> "D" - in the
> range 60-69 ALSO qualifies as an "F" - less than
> 61.
>
> maybe the "F" grade is a score less than 60?
>
>
>
>
> --- In libertybasic@yahoogroups.com, "bill"
> <majorwar@y...> wrote:
> >
> > Hi,
> > I am a college student and I am new to Leberty
> Basic. I am
> writing
> > a program that is supposed to find the averages of
> three scores for
> > 30 different students and print out a letter
> am
> > having is that I am not sure how to put in a
> number range, IE. a
> > letter grade of "B" is a number between 80 and 90.
> Any suggestions?
> >
> > REM Bill E
> > rem Project Delta
> > rem OCT 26 2005
> > rem this program will take 3 grades per
> student,average them, and
> > then provide an output with the name and letter
> student
> > rem VAR studentname\$= The array holding the
> student names
> > rem VAR studentscore= The array holding the
> students average
> > rem VAR student\$= The students namerem VAR
> c=counter
> > rem VAR average = average of three scores
> > rem VAR x=Variable number on counter
> > rem clear screen
> > cls
> > rem Making the arrays
> > dim studentname\$(30)
> > dim studentscore(30)
> > rem input student names
> > input "Enter student name:" ; student\$
> > while student\$ <> ""
> > rem counter to tell us how many students we
> have processed
> > let c = c+1
> > cls
> > input "Enter the first score:" ; score1
> > cls
> > input "Enter the second score:"; score2
> > cls
> > input "Enter the third score:"; score3
> > let studentname\$(c) = student\$
> > let average =(score1+score2+score3) /3
> > let studentscore(c) =average
> > cls
> > input "Enter the next students name, or hit
> enter to
> continue:";
> > student\$
> > wend
> > cls
> > for x = 1 to c
> > print " BILLS GRADE
> > BOOK "
> > print "Student",
> > print " BILLS GRADE
> > BOOK "
> > print "Student",
> > next x
> > end
> >
> > if studentscore(x) <61 then
> > Else
> > if studentscore(x) = 60 69 then
> > END IF
> > END IF
> > if studentscore(x) = 70 79 then
> > Else
> > if studentscore(x) = 80 89 then
> > END IF
> > END IF
> > if studentscore(x) >90 then
> > Else
> >
> > END IF
> > Return
> >
>
>
>
>
>
>

__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
• I actually solved the problem by making it = Thank you! ... __________________________________ Yahoo! FareChase: Search multiple travel sites in one click.
Message 3 of 8 , Nov 2 8:52 AM
• 0 Attachment
I actually solved the problem by making it ">=" Thank
you!

--- pendl2megabit <pendl2megabit@...> wrote:

> Bill,
> here is one solution for your problem.
>
> '---code start
> ' Bill E
> ' Project Delta
> ' OCT 26 2005
> ' this program will take 3 grades per
> student,average them, and
> ' then provide an output with the name and letter
> ' VAR studentname\$= The array holding the student
> names
> ' VAR studentscore= The array holding the students
> average
> ' VAR student\$= The students name' VAR c=counter
> ' VAR average = average of three scores
> ' VAR x=Variable number on counter
> ' Making the arrays
> dim studentname\$(30)
> dim studentscore(30)
> ' clear screen
> cls
> ' input student names
> input "Enter student name:" ; student\$
> while student\$ <> ""
> ' counter to tell us how many students we have
> processed
> let c = c+1
> print
> input "Enter the first score:" ; score1
> print
> input "Enter the second score:"; score2
> print
> input "Enter the third score:"; score3
> ' calculate the average
> let studentname\$(c) = student\$
> let average =(score1+score2+score3) /3
> let studentscore(c) =average
> print
> print "Enter the next students name"
> input "or hit enter to continue:"; student\$
> cls
> wend
> BOOK"
> for x = 1 to c
> print
> next x
> end
>
> if studentscore(x) < 90 then grade\$(x) = "B"
> if studentscore(x) < 80 then grade\$(x) = "C"
> if studentscore(x) < 70 then grade\$(x) = "D"
> if studentscore(x) < 60 then grade\$(x) = "F"
> Return
> '---code end
>
> ---
> Stefan Pendl
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: libertybasic@yahoogroups.com
> >
> > Hi,
> > I am a college student and I am new to Leberty
> Basic. I am writing
> > a program that is supposed to find the averages of
> three scores for
> > 30 different students and print out a letter
> grade. The problem I am
> > having is that I am not sure how to put in a
> number range, IE. a
> > letter grade of "B" is a number between 80 and 90.
> Any suggestions?
> >
> ---snip
>
>
>
>
>
>
>
___________________________________________________________
>
> Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher
> kostenlos - Hier anmelden: http://mail.yahoo.de
>

__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
Your message has been successfully submitted and would be delivered to recipients shortly.