Can someone help me with this problem? (comp programming.)?

Write a program named FirstQtrTestScores that gets a student's full name, asks for her four 1st Quarter test scores, keeps track of the total first quarter test points, and calculates the average test score.

Use the following variables:
One that controls the loop (Use a for loop)
One that keeps track of the number of test scores that have been entered
One that stores the test scores as they are entered by the user.
One that keeps track of the total points
One that calculates and stores the average test score.

The message at the end should read as follows:
Remember: the [ ] symbols indicate output that will vary depending on what the user enters for input.
Student Name: [Sally Sue]
First Quarter Tests: 4
First Quarter Test Average: [89.1]

I mean, i'm not just blatantly asking someone to do my homework for me, but i'mc confused how to set this up? Like, test scores is multiple so i'm not sure how i would do that, and in the for loop can i still assign a value to the variable "testScores"?

Updates:
12d uhh... i did this, but i didn't use a for loop.. i seriously need help.

import java. util.*;
public class FirstQtrTestScores
{
public static void main (String[] args)
{
Scanner scan = new Scanner (System. in);
int numberOfTests = 3;
String name;
int firstScore;
int secondScore;
int thirdScore;
int totalScore;
int averageScore;

System. out. println ("What is your name?");
name = scan. next ();
12d System. out. println ("What is your first test score in first quarter?");
firstScore = scan. nextInt ();

System. out. println ("What is your second test score in first quarter?");
secondScore = scan. nextInt ();

System. out. println ("What is your third test score in first quarter?");
thirdScore = scan. nextInt ();

totalScore = firstScore + secondScore + thirdScore;

while (totalScore >= 0)
{
averageScore = firstScore + secondScore + thirdScore / 3;
totalScore++;
}
}
}

0|0
0|1

What Guys Said 1

  • Place an input () or raw_input () statement into the for loop.

    Take the input () object and append to a running list.

    Use np. mean or w/e to find that average test score.

    0|0
    0|0
    • 12d

      This is how I would do it with Python or C++ at least

    • Show All
    • 12d

      i've never heard of raw inputs or cardinality function, i think we're using different languages so it hard to communicate, you with c++/python and me with java. but thank you anyways.
      These are definite/indefinite while loops and definite for loops and boolean expressions

    • 12d

      All right, good luck to you

What Girls Said 0

No girls shared opinions.

Loading...