Averaging 15 User-input Grades And Then Telling The Letter Grade
Jun 5, 2011
It is meant to average 15 user-input grades and then from there I have to provide the letter grade that corresponds with the average percent. I understand how to provide the corresponding letter grade, but I don't understand how to get the average. I've tried putting it into arraylist format
View 4 Replies
ADVERTISEMENT
May 13, 2011
"I need to create a program that will allow the user to enter in 10 test grades from a class. I need to store these grades into an array, and use a loop to add up the total. Then I'll need to output the average, and the letter grade for the average using:
90 - 100 A
80 - 89 B
70 - 79 C
60 - 69 D
Below 60 F"
That's all it needs to do. Here is some code that shows you that the only thing I know how to do is (allow the user to enter in 10 test grades from a class.) The rest I'm so lost on and have a crappy instructor. This assignment is due tomorrow, but the instructor is not available over the weekend.
Here is my This is all I have:
Dim MyNumbers(9) As Integer
Dim Total As Integer
Dim i As Integer
[Code]....
View 9 Replies
Mar 18, 2010
For a class assignment I created an application that takes grades from the user via input box and adds them to an array called grades. Here is some of the code.
vb.net
Option Strict On
Option Explicit On
Option Infer Off
[Code]...
My problem is that the variable x is an integer and the user input from the InputBox is a string so I get the error: "Option Strict On disallows implicit conversion from 'String' to 'Integer'.I've already submitted this assignment with out the first three lines of code (which allows the code to run flawlessly), but I would like to know how to get around the error while still using the Option Strict On parameter. I am aware of the ToString method but I am not sure of how to use it here or even if it will work here. I've tried to use in a few variations but none worked.
View 14 Replies
Apr 1, 2010
iam currently working on my uni project and i have encountered a problem with valadation section.My system displays a message telling the user to input any fields that they have missed out on, listing the name of the field. However as these IF functions are in order the user must input the data in the order of how it is in the code. for example if the "consweight" is inputed and the calculate button is pressed, it thinks that all valadation above it has occured, when those fields are still empty.
[code]...
View 1 Replies
Jan 31, 2010
I have to write a program using 2 parallel arrays representing grade point and grades. The grade points range from 0 to 500, however, we are only to use the minimum points per each letter grade in " points " array. This is shown in the code below. You then enter a number from 1 to 500, representing the grade points, and in turn it spits out your letter grade.My problem is this. When I enter a number, say 200, I get a letter " D " grade instead of an " F " grade. It appears that every number range I enter gives me one letter grade less than what it is supposed to be. Also, any number 450 to 500, representing an " A " grade does not even register in my Grades Label.
[Code]...
View 7 Replies
Apr 15, 2011
I'm new to coding and i need to make a program that takes 3 percentages(numbers) and returns an average of the grades in letter format(A,B,C). This is what I have so far:[code]......
View 2 Replies
Mar 3, 2010
It works up to this point but when I try to add so that 70-79 is a C, 60-69 is a D, and 60 and less is a F I run in to problems.
Module Module1
Dim Average As Integer = 0
Dim Response As String = ""
[code].....
View 3 Replies
Nov 21, 2010
I have coded this not sure how to get it to display correctly to the lblGrade box. I have set it up for. Supposed to take the average of three grades and display the letter grade for the average of the three grades.
Here is the code
Public Class frmMain
Private Function CalculateGrade _
(ByVal txtTest1 As Decimal, ByVal txtTest2 As Decimal, _
ByVal txtTest3 As Decimal) As String
Dim AverageScore As Double
[Code] .....
View 8 Replies
Dec 14, 2009
I made an application that calculates course grades. The program runs perfectly except for the last part
The the final grade number comes from the label "lblCoursePts" and i want to put the letter grade in the label "lblFInalGrade" Here is what i have.
'Determine the final letter grade
Select Case lblCoursePts.Text
Case 90 To 100 : lblFinalGrade.Text = "A"
[Code]....
View 5 Replies
Feb 23, 2010
How do you enter in a code for an overall letter grade from a percentage given? I have a seperate box for the letter grade and a seperate one for a the percentage grade . I have it setup when an overall grade and possible grade is entered into boxes it will give me a grade percent but not a letter grade. How is that added? I am doing this for my course project but dont undersatnd the coding very well. I am just trying to pass the class.
View 1 Replies
Nov 19, 2010
I need someone with patience and can go through a solution with me from the Clearly Visual Basic book. I'm good with computers and can usually learn things relatively fast on my own time and in my own way, but I'm going to school for computer programming and, with certain things, I learn better with things explained to me rather than reading from a book. If someone has the time to go over this solution I'm doing and explain it to me in a way I'd have a better chance of understanding, I'd be truly grateful. I need a tutor, for lack of a better word. The lab I'm doing is from the Clearly Visual Basic book and the instructions are:
Code an application that displays a letter grade based on the averages of three test scores. Code the application using a function to determine and return the letter grade. If the average is at least 90, the grade is A. If the average is at least 80 but less than 90, the grade is B. If the average is at least 70 but less than 80 the grade is C. If the average is at least 60 but less than 70, the grade is D. If the average is below 60, the grade is F.
[Code]...
View 17 Replies
Jun 3, 2011
I have been struggling with my programming class from day one. I still can't seem to grasp the complete logic on how to write code. Anyhow, I have an assignment due that I am stuck on. Here is the assignment:
In this exercise, you code an application that displays a letter grade based on the average of three test scores. Open the Grade Solution (Grade Solution.sln) file, which is contained in the ClearlyVB Chapl8Grade Solution folder. Code the application,using a function to determine and return the letter grade. If the average is at least 90, the grade is A. If the average is at least 80 but less than 90, the grade is B.If the average is at least 70 but less than 80, the grade is C. Tf the average is at least
60 but less than 70, the grade is D. If the average is below 60, the grade is F.
You will be developing the code for the function on your own. Below the Public Class frmMain line, insert this function header:Private Function CalculateGrade(ByVal testScore1 As Decimal, ByVal testScore2 As Decimal, ByVal testscore3 As Decimal) As String
In the function, declare variables for the average score and the letter grade. Calculate the average, use IF/Elself statements to determine the letter grade, and return the letter grade. Create a subprocedure for the Click event for the btnDisplay button. It should call the CalculateGrade function with three arguments ( the three test scores from the text boxes), and display the returned value in the lblGrade box.
[Code]...
View 3 Replies
Apr 18, 2011
I am taking an online class and I am having trouble getting my solution to work. My assignment is as follows: In the function, declare variables for the average score and the letter grade. Calculate the average, use If/ElseIf statements to determine the letter grade, and return the letter grade.
Create a subprocedure for the Click event for the btnDisplay button. It should call the CalculateGrade function with three arguments (the three test scores from the text boxes), and display the returned value in the lblGrade box.I have looked all over the internet and have had no luck finding an example to look at I am taking an online class and I am having trouble getting my solution to work. My assignment is as follows:
In the function, declare variables for the average score and the letter grade. Calculate the average, use If/ElseIf statements to determine the letter grade, and return the letter grade.
[Code]...
View 7 Replies
Nov 11, 2009
Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
[CODE]...
My code will only let me typ one number into the text box and then it brings me back to the code and says "stack over flow exception was unhandled.
View 5 Replies
Jul 27, 2011
The exercise prior to this one had us use two parallel arrays that store a letter grade (A, B, C, D, F) and the minimum points needed for each grade. The user input the points earned by the student and the program shows their letter grade. It took a minute, but I got that one done, and it does what it's supposed to do.This exercise has us modify that exercise to ask for the (via InputBox in MainForm Load event) total points possible. The grade is then determined by percentage of the total points possible. For instance, if x is the user input, an "A" would be 90% of x.
View 4 Replies
Jun 28, 2010
I am a vb newbie having some trouble with an assignment. A user enters a letter into a text box, and the output must make the letter uppercase and tell what position the letter is at in the sentence "The quick brown fox jumps over a lazy dog."
Here is my
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
[CODE]...............
This is what comes out: "A first occurs in position -1". Everything comes out except the position is always displayed as -1.
View 4 Replies
Jul 31, 2011
I need some help on telling the program how to check if user typed the text article shown correctly word by word as they are typing. I've tried
Usertypehere.Text = Articleshown.text
But the program only consider the user to type correctly if they finished typing the whole article.
View 8 Replies
Oct 5, 2011
I have to create an application that lets a user enter as much grades he wants. The grades are between 0 and 100 and they can't be negative. Whenever the user type -1, the application is done and it shows the average of the grades, the lowest and the highest grades.I absolutly have no idea where to start but i must be using loop/do/while.
View 4 Replies
May 30, 2011
wondering what i should use to make the 1st letter of the input users name is Capitalised.
so textbox 1 they would enter - josh and when its shown in any labels is shows - Josh
would ucase be used here ? im not sure.
View 6 Replies
Mar 16, 2010
input = "my mother is a great lady" output = A -3, B - 0, C - 0, D - 1, E - 2
I wanted to count the number of times letter A - E is in the input string.
View 7 Replies
Nov 9, 2009
Is there any way to use the TryParse method to check for letter text input?For example, a user needs to input a name in a text box. Is there anyway to check that input are all letters?
View 4 Replies
Jan 15, 2011
I need some help with the input validation of my application. Attached is the code that I have written as well as a screenshot of the front end. I specifically need input validation to verify that the user selected input for cbLengthOfStay is a number between 1-10 as well as input validation to verify the user input for txtMedication, txtSurgicalCharges, txtLabFees and txtRehabilitation is a positive numerical number. Please feel free to critique my attached code. [Code]
View 2 Replies
Feb 19, 2012
If my Category and Forum selection is incorrect I am sorry and feel free to move it. I'd like to have the users input in the message box that will show. For example: There is a textbox and the user puts in their name as Bob. Then the message box would be: What my main goal is, is being able to include the users input they type inside the textbox inside the message box.
View 6 Replies
Apr 14, 2012
Haveing troubles with an assignment. I am writting code that will allow user to enter a score and the program returns a grade based on the score entered. I can get it to work using "IF" statements but want to use code for ranges. My "IF" code is as follows.......
[Code]...
View 1 Replies
Apr 14, 2012
Haveing troubles with an assignment. I am writting code that will allow user to enter a score and the program returns a grade based on the score entered. I can get it to work using "IF" statements but want to use code for ranges. My "IF" code is as follows.......
[Code]....
View 2 Replies
Oct 24, 2009
How would i get the last letter the user typed in?
View 8 Replies
Nov 3, 2011
Option Strict On Public Class Form1 Private Sub btnDistance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDistance.Click 'The btnEnterSpeed click event accepts and displays up to ten speeds from the user'and then calculates and displays average speed
[Code]...
I cannot figure out how to incorporate the number of days into the input box then get it to loop and count the number of times the User inputs in the number of days. Then I have to incorporate it into the equation to get the total distance D = MPH * Hours. What I have right now wil not count up the number of days and locks up after I input one number and will not add anything to the listbox. Because I also have to make sure that they cant add nonnumaric values and the number of hours per day cannot exceed 20. I have put things in and taken them out but it has been 2 days and I am lost now
View 1 Replies
Oct 24, 2010
I have a passport number textbox and I want to limit the user to 7 numbers and a Letter in the textbox. How Do I do that?
View 1 Replies
Mar 11, 2010
I have made a program that i would like to be able to move from PC to PC; at the moment i would have to change the string directories within the program for each PC i would like top run it on.
By having the user select their drive letter and type their account name into a text box could this be implemented into a directory.
Below is the code, as i was hoping it was coded (lol never is tho).
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Filename As String = ("*.torrent")
[Code]......
View 4 Replies
Sep 25, 2011
I have a web application build using classic ASP and VB. How do I print a document from within the back end VB code?
Protected Sub btnPrint_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPrint.Click
End Sub
What i am trying to do is get user to click on button a letter is generated and sent to printer?
View 2 Replies