1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
grin007 [14]
3 years ago
13

Array testGrades contains NUM.VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full cre

dit is 100, so anything over 100 is extra credit. Ex: If testGrades (101,83, 107,90), then sumExtra 8, because 1+0+7+0 is 8
import java.util.Scanner; 3 public class SumoFExcess ( 4 public static void main (String [ args) ( Scanner scnr -new Scanner (System.in); final int NUM VALS -4 int[] testGrades-new int[NUM VALS]; int ij int sunExtra 9999; 11 Assign sunExtra with 0 before your for loop 10 for (i-0; ǐ < testGrades.length; +.1) { testGrades[1]-scnr.nextInt) 12 14 15 / Your solution goes here 16 System.out.printin("sumExtra:sumExtra);
Computers and Technology
1 answer:
Soloha48 [4]3 years ago
5 0

Answer:

12.       for (i = 0 ; i < testGrades.length ; i+=1 ){

13.           if (testGrades[i] > 100){

14.              sumExtra = sumExtra + testGrades[i] - 100;}

15.       }

Explanation:

We first iterate through the entire testGrades array. For each test score that is in testGrades ( that is testGrades[i] ), we see whether or not the test grade is above 100 (See line 12) . If test grade is greater than 100, this means we have extra credit. We simply subtract 100 from the test grade, add it with the previous value of sumExtra and store the value back in sumExtra(see line 14). Once i is greater than the length of the test grades, the loop is exited. We can now print sumExtra to obtain the result.

You might be interested in
You are given a data set with information from 1,000 high school students (of which the following is a part of the data) and ask
serg [7]

Answer:

Classification

Explanation:

Building a machine learning solution that can predict the success of a student in completing a college degree is a binary problem. There are two possible answer: success or not success.  

This brings us to a supervised machine learning problem, where one trains the technique with labeled data whether it is a success or not. Since the target variable is discrete (not continuous), classification technique has to be used.  

3 0
3 years ago
Over the past year alone, more than _________ have been stolen from Target.
jasenka [17]
40 million (google said so)
6 0
3 years ago
Read 2 more answers
Pictures that you can click on to tell your computer what to do.
Tom [10]
What do you mean ? I’m confused..
6 0
3 years ago
Read 2 more answers
Point to ______ of a cell to fill the cell to the right or down.
UNO [17]

Answer:

It's "The bottom left corner"

Explanation:

8 0
2 years ago
Read 2 more answers
Edhesive code practice 4.8 Question 3
vovangra [49]

Answer:

for i in range(200,301,2):

  print(i)

Explanation:

just copy and paste 100 percent

3 0
3 years ago
Read 2 more answers
Other questions:
  • How can you recognize an unsecured wireless network?
    9·1 answer
  • Using ajax technologies and apis, websites and applications can pull information from a variety of sources in order to create __
    8·1 answer
  • 3. What type of error is in the following sentence? "George W. Bush is the President of the United States of
    5·1 answer
  • Which protocol do many browsers assume when you enter a URL in the address field?
    9·1 answer
  • Can anyone help me with getting bash ubuntu on windows setup?
    15·1 answer
  • What is data? why is it important to collect data ? explain the points.​
    10·1 answer
  • When power is completely removed from your computer
    11·1 answer
  • What would the internet be like today if there was no World Wide Web?
    9·1 answer
  • How do you put text in MS publisher?<br><br> When do you use text wrapping?
    14·1 answer
  • When network traffic is encrypted, it is invisible and its content and purpose are masked.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!