rray testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full credit is 100, so anything over 100 is extra credit. Ex: If testGrades

Answers

Answer 1

Answer:

Replace

/* Your solution goes here */

with

sumExtra = 0;

for (i =0; i<NUM_VALS;i++){

if(testGrades[i]>100){

sumExtra = sumExtra - testGrades[i] + 100;

}

}

Explanation:

This line initializes sumExtra to 0

sumExtra = 0;

The following is a loop from 0 to 3

for (i =0; i<NUM_VALS;i++){

The following if condition checks if current array element is greater than 100

if(testGrades[i]>100)

{

This line calculates the extra credit

sumExtra = sumExtra - testGrades[i] + 100;

}

}

See attachment for complete question


Related Questions

Use the drop-down menus to explain how to personalize a letter.
1. Place the cursor where the name and address should appear.
2. Select
v in the mail merge wizard.
3. Select the name and address format and
if needed to link the correct data to the field.
4. Place the cursor below the address block, and select
from the mail merge wizard.
5. Select the greeting line format and click

Answers

Explanation:

Address block

Match Fields

Greeting Line

Ok

Place the cursor where the name and address should appear: This step is important as it identifies the exact location where the personalized information should be placed in the letter.

What is personalization?

Personalization refers to the process of customizing a communication, such as a letter or email, to make it more individualized and relevant to the recipient.

To explain how to personalize a letter:

Place the cursor where you want the name and address to appear: This step is critical because it determines where the personalised information should be placed in the letter.

In the mail merge wizard, enter v: This step involves selecting the mail merge feature in the word processor software. The mail merge feature is typically represented by the "v" symbol.

Choose the name and address format, and then [link] to link the correct data to the field: This step entails selecting the appropriate name and address format, such as "First Name," "Last Name," and "Address Line 1." It also entails connecting the data source (for example, a spreadsheet or database) to the relevant fields in the letter.

Place the cursor below the address block and use the mail merge wizard to select [Insert Greeting Line]: This step involves deciding where to place the greeting line in the letter, which is usually below the address block. The mail merge wizard offers formatting options for the greeting line based on the data source.

Choose the greeting line format and press [OK]: This step entails deciding on a greeting line format, such as "Dear [First Name]" or "Hello [Full Name]." Once the format is chosen, the user can finish personalising the letter by clicking "OK."

Thus, this can be concluded regarding the given scenario.

For more details regarding personalization, visit:

https://brainly.com/question/14514150

#SPJ2

In ____________, a large address block could be divided into several contiguous groups and each group be assigned to smaller networks.

Answers

Write the answers so we can answer your question

what is an instruction set architecture​

Answers

Answer:

Instruction set architecture is the abstract model of a computer and is the part of the processor that is visible to the programmer or compiler writer

Explanation:

In computer science, an instruction set architecture (ISA) is an abstract model of a computer. It is also referred to as architecture or computer architecture. A realization of an ISA, such as a central processing unit (CPU), is called an implementation.


ANSWER ASAP PLSSS
ALSO GIVE ME RIGHT ANSWER NOT A RANDOM ONE

———-——-————————

Question 1 (1 point)
What function would you use to find the total number of views of all the videos?
Average
ОMax
Count
Min
Sum

Answers

Answer:

ethier you can do sum and average

I believe the answer would be sum

Write a program that asks the users to input his/her last name first, then first name. Display a new user name which is the first letter of the user’s first name plus last name and a random number between 1 and 10.

Answers

Answer:

import random

last_name = input("Enter last name: ")

first_name = input("Enter first name: ")

number = random.randint(1, 10)

user_name = first_name[0] + last_name + str(number)

print(user_name)

Explanation:

*The code is in Python.

import the random to generate a random number

Ask the user to enter the last_name and first_name

Generate a random number between 1 and 10 using randint() method

Set the user_name as first letter of the first name (use indexing, the item in the index 0 is the first letter) and last name and the number you generated

Print the user_name

EV = 225, PV = 200, AC = 255. What is CPI? What does this calculation tell you?

Answers

Answer:

CPI = EV / AC

225 / 255 = 0.88235

This tells you the measure of the average change over time in the prices paid by urban consumers for a market basket of consumer goods

Explanation:

What was the main reason IPv6 was created?
A. To improve the system
B. They needed a faster network
C.they were running out of addresses
D. To include more countries

Answers

Answer:

C.

Explanation:

I think the answer is C. because one of the main problems were that 'the primary function of IPv6 is to allow for more unique TCP/IP address identifiers to be created, now that we've run out of the 4.3 billion created with IPv4.'

Assignment 3 chatbot edhesive

Answers

Answer:

name1=input("What is your first name? ")

name2=input("What is your last name? ")

print("Hi there, "+ name1+" "+name2 +" ,nice to meet you!")

print("How old are you?")

age = int(input(" "))

print(str(age) + " is a good age.")

if(age >= 16):

   print("You are old enough to drive. \n")

else:

   print("Still taking the bus, I see. \n")

   

print("So, " + name1 + ", how are you today?")

feel=input("")

print("You are " + feel),

if(feel== "Happy"):

   print("That is good to hear.")

elif(feel == "Sad"):

   print("I'm sorry to hear that. ")

else:

   print("Oh my!")

   

print("Tell me more. \n")

next=input("")

import random

r = random.randint(1, 3)

if(r==1):

   print("Sounds interesting. \n")

elif(r==2):

   print("That's good to hear. \n")

else:

   print("How unusual. \n")

print("Well, " + name1 + ", it has been nice chatting with you.")

Explanation:

Write a for loop that reads an integer from the user, and prints the sum of numbers from 1 to that integer (inclusive). If the user enters a number less than 1, he/she should be prompted to enter a number greater or equal to 1.

Answers

Answer:

Written in Python

num = int(input("Number: "))

while num < 1:

    num = int(input("Number: "))

total = 0

for i in range(1, num+1):

    total= total + i

print("Total: "+str(total))

Explanation:

This line prompts user for input

num = int(input("Number: "))

The following iteration checks and prompts user for valid input

while num < 1:

    num = int(input("Number: "))

This initializes total to 0

total = 0

The following iteration adds from 1 to input number

for i in range(1, num+1):

    total= total + i

This displays the total

print("Total: "+str(total))

Custom function definitions:________.
A. Must be written before they are called by another part of your program
B. Must declare a name for the function
C. Must include information regarding any arguments (if any) that will be passed to the function
D. all of the above

Answers

Answer:

D. all of the above

Explanation:

A option is correct and function definition must be written before they are called by another part of your program. But in languages such as C++ you can write the prototype of the function before it is called anywhere in the program and later write the complete function implementation. I will give an example in Python:

def addition(a,b): #this is the definition of function addition

    c = a + b

    return c    

print(addition(1,3)) #this is where the function is called

B option is correct and function definition must declare a name for the function. If you see the above given function, its name is declared as addition

C option is correct and function definition must include information regarding any arguments (if any) that will be passed to the function. In the above given example the arguments are a and b. If we define the above function in C++ it becomes: int addition( int a, int b)

This gives information that the two variables a and b that are parameters of the function addition are of type int so they can hold integer values only.

Hence option D is the correct answer. All of the above options are correct.

What is a file manger ? The file manger is user A . Medium B.platform C. Interface .

Answers

Answer: C. Interface.

Explanation:

File manager is an interface between the hardware part of a computer and the software. the main function of a file manager is to help the user manage all files which they have stored up on their computers. for example the file managers allows the users to view, copy, delete and edit the files which they have stored up on their computer storage devices.

Aswer asap

Give two importance of hashing

Answers

1. It’s a secure way to receive data.
2. Hashes aren’t used to encrypt any sort of data.

how do i set it up? can u guys like give examples its for computer science its suppose to be a program

Answers

public class Lab02_Favorite{

    public static void main(String []args){

       System.out.println("I miss going bowling with my friends");

    }

}

"How do you split your time between traditional television and streaming video? Has it changed? If so, how?"

Answers

please comment what device you’re using and maybe i can help :)

This assignment requires you to write a well documented Java program to calculate the total and average of three scores, the letter grade, and output the results. Your program must do the following:
Prompt and read the users first and last name
Prompt and read three integer scores
Calculate the total and average
Determine a letter grade based on the following grading scale - 90-100 A; 80-89.99 B; 70-79.99 C; below 70 F
Use the printf method to output the full name, the three scores, the total, average, and the letter grade, properly formatted and on separate lines.
Within the program include a pledge that this program is solely your work and the IDE used to create/test/execute the program. Please submit the source code/.java file to Blackboard. Attached is a quick reference for the printf method.

Answers

Answer:

The solution is given in the explanation section

Don't forget to add the pledge before submitting it. Also, remember to state the IDE which you are familiar with, I have used the intellij IDEA

Follow through the comments for a detailed explanation of each step

Explanation:

/*This is a Java program to calculate the total and average of three scores, the letter grade, and output the results*/

// Importing the Scanner class to receive user input

import java.util.Scanner;

class Main {

 public static void main(String[] args) {

   //Make an object of the scaner class

   Scanner in = new Scanner(System.in);

   //Prompt and receive user first and last name;

   System.out.println("Please enter your first name");

   String First_name = in.next();

   System.out.println("Please enter your Last name");

   String Last_name = in.next();

   //Prompt and receive The three integer scores;

   System.out.println("Please enter score for course one");

   int courseOneScore = in.nextInt();

   System.out.println("Please enter score for course two");

   int courseTwoScore = in.nextInt();

   System.out.println("Please enter score for course three");

   int courseThreeScore = in.nextInt();

   //Calculating the total scores and average

   int totalScores = courseOneScore+courseTwoScore+courseThreeScore;

   double averageScore = totalScores/3;

   /*Use if..Else statements to Determine a letter grade based on the following grading scale - 90-100 A; 80-89.99 B; 70-79.99 C; below 70 F */

   char letterGrade;

   if(averageScore>=90){

     letterGrade = 'A';

   }

   else if(averageScore>=80 && averageScore<=89.99){

     letterGrade = 'B';

   }

     else if(averageScore>=70 && averageScore<=79.99){

     letterGrade = 'C';

   }

   else{

     letterGrade ='F';

   }

   //Printing out the required messages

   System.out.printf("Name:  %s %s\n", First_name, Last_name);

   System.out.printf("scores: %d %d %d:  \n", courseOneScore, courseTwoScore, courseThreeScore);

   System.out.printf("Total and Average Score is: %d %.2f:  \n", totalScores, averageScore);

   System.out.printf("Letter Grade: %C:  \n", letterGrade);

  // System.out.printf("Total: %-10.2f:  ", dblTotal);

 }

}

What do you think will happen if the steps in scientific method are in different order?

Answers

Well personally I don’t think that’s a good idea think you should put in the correct order

TCP/IP-based protocols called ________ established a _____ between two computers through which they can send data.

Answers

Answer:

1. Communications Protocol

2. Network

Explanation:

TCP/IP is an acronym in computer science or engineering, that stands for Transmission Control Protocol or Internet Protocol. It is often referred to as COMMUNICATIONS PROTOCOL. It is technically utilized for the interconnection of NETWORK for machines or gadgets on the internet. In some other cases, it can also be used as either intranet or extranet; a form of a private computer network.

Hence, in this case, the correct answer is TCP/IP-based protocols called COMMUNICATIONS PROTOCOL established a NETWORK between two computers through which they can send data.

Which statement about GIF images is true?

Group of answer choices

They cannot be animated.

They are limited to 256 colors.

They are optimized for making large printouts.

Their compression is lossy.

Answers

The correct answer would BE (puns) B. They are limited to 256 colors

The statement that is true regarding GIF is that they are limited to 256 colors. The correct option is B.

What is GIF?

GIF (graphics interchange format) is a digital file format invented in 1987 by Internet service provider CompuServe to reduce the size of images and short animations.

GIFs are short animations and video clips. GIFs are frequently used to represent a feeling or action.

LZW compression is used in the GIF format, which is a lossless compression method.

However, because GIF files are limited to 256 colors, optimizing a 24bit image as an 8bit GIF can result in color loss. GIF is a raster data format originally developed for simple images that are commonly found on the internet.

In a browser, you can control how colors dither and choose the number of colors in a GIF image.

Thus, the correct option is B.

For more details regarding GIF, visit:

https://brainly.com/question/24742808

#SPJ2

Uncontrolled railroad crossing warning signs include _____


A. round black-on-yellow warning signs.


B. red flashing lights.


C. crossing gates.


D. none of the above

Answers

Answer:

letter D

Explanation:

The controlled railroad crossings have red lights and warning signs with railway gates. But if none of those items are present, then it is an uncontrolled railroad crossing.

Uncontrolled railroad crossing warning signs include; D; None of the above

There are two main types of railroad crossings namely;

Controlled railroad crossing warning signs.Uncontrolled railroad crossing warning signs.

     A Controlled railroad crossing has signs such as warning signs, red lights and railway gates.

     However, in uncontrolled railroad crossing, the signs don't include any of the ones listed for controlled railroad crossing signs but instead will have no signs, no signals and no gates.

      Looking at the options, A, B and C represent controlled railroad crossing signs and so the correct answer in none represents uncontrolled railroad crossing signs.

Read more about railroad crossings at; https://brainly.com/question/4360017

Windows 1.0 was not considered to be a "true" operating system but rather an operating environment because _____.


it provided a shell for MS-DOS

it could only run one application at a time

it didn't use a pointing device

it crashed a lot

Answers

The answer is A it provided a shell for Ms-DOS

What are the disadvantages of batch operation system

Answers

The computer operators should be well known with batch systems.

Batch systems are hard to debug.

It is sometime costly.

The other jobs will have to wait for an unknown time if any job fails.

Explanation:

Answer:

Disadvantages of Batch Operating System:

The computer operators should be well known with batch systems.Batch systems are hard to debug.It is sometime costly.The other jobs will have to wait for an unknown time if any job fails.

Instagram

Hello everyone hope you are doing well,
I am having this issue where i don’t receive notifications from instagram.

I tried signing in from another device and it workedd
( both phones are ios and same settings)
What should i do to receive notifications?
Please help
Thanks!

Answers

uninstall instagram and install it again. log in and go to settings and fix up the notifications maybe that’ll work??

if it doesn’t, go to your apple settings and see if the notifications for instagram are on.

also try shutting your phone off for a few seconds if you do either one.

List the languages in order from highest level to lowest.

O Python, binary, bytecode

O binary, Python, bytecode

O Python, bytecode, binary

O binary, bytecode, Python

Answers

Answer:

Python, bytecode, binary

Explanation:

Python is a high-level multi-purpose programming language. it is very popular and is easy to learn. Its syntax is more English-like compared to other programming languages.

Binary is a form representing data in digital form. It only uses numbers 1 and 0. Binary can be in the form of a machine code or a bytecode.

bytecode is a form of binary for virtual microprocessors which can only be interpreted to machine code for direct processing.

Maria is designing a website. What might Maria use to avoid writing every part of the code from scratch?

a
HTML
b
JQuery
c
Python
d
CSS

Answers

Answer:

CSS (d)

Explanation:

To create a public key signature, you would use the ______ key.

Answers

Answer:

To create a public key signature, you would use the _private_ key.

Explanation:

To create a public key signature, a  private key is essential to enable authorization.

A private key uses one key to make data unreadable by intruders and for the data to be accessed the same key would be needed to do so.

The login details and some important credentials to access user data contains both the user's public key data and private key data. Both private key and public key are two keys that work together to accomplish security goals.

The public key uses different keys to make data readable and unreadable.

The public key is important to verify authorization to access encrypted data by making sure the access authorization came from someone who has the private key. In other words, it's a system put in place to cross-check the holder of the private key by providing the public key of the encrypted data that needed to be accessed. Though, it depends on the key used to encrypt the data as data encrypted with a public key would require a private key for the data to be readable.

4.16 LAB: Varied amount of input data Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Ex: If the input is: 15 20 0 5 -1 the output is: 10 20 You can assume that at least one non-negative integer is input. 254058.1561406

Answers

Answer:

Here is the C program. Let me know if you want the program in some other programming language.

#include <stdio.h>   //to use input output functions

int main() {   //start of main function

int num;   // to store input numbers

int sum = 0;  //to store the sum of numbers

scanf("%d", &num);   //reads the numbers from user

int count = 0;   //to count the total numbers entered by user

int max = 0;   //to store the maximum of numbers

while(num >= 0)  {  //continues to execute until user enters negative number

sum+=num;   //adds the numbers

scanf("%d", &num);   //reads the numbers from user

count++;   //counts the numbers entered

if(num>=max){    //if number is greater than numbers stored in max

 max = num;   }   }  //assigns that maximum number to max

   printf("%d %d", sum/count,max);  }  //displays the average of numbers and maximum of numbers

Explanation:

I will explain the program with an example. Lets say the first number input by user is 15. Then the loop works as follows:

At first iteration:

num >= 0 is true because 15 is greater than 0 so program moves to the body of loop

sum+=num; becomes:

sum = sum + num

sum = 0 + 15

sum = 15

count++; becomes:

count = count + 1

count = 0 + 1

count = 1

if(num>=max) means if(15>=0) this is true so

 max = num;  this becomes:

max = 15

Lets say the next value entered by user is 20. It is stored in num variable

At second iteration:

num >= 0 is true because 20 is greater than 0 so program moves to the body of loop

sum+=num; becomes:

sum = sum + num

sum = 15 + 20

sum = 35

count++; becomes:

count = count + 1

count = 1 + 1

count = 2

if(num>=max) means if(20>=15) this is true so

 max = num;  this becomes:

max = 20

Lets say the next value entered by user is 0. It is stored in num variable

At third iteration:

num >= 0 is true because 0 is equal to 0 so program moves to the body of loop

sum+=num; becomes:

sum = 35 + num

sum = 35 + 0

sum = 35

count++; becomes:

count = count + 1

count = 2 + 1

count = 3

if(num>=max) means if(0>=20) this is false so

 max = num;  this remains:

max = 20

Lets say the next value entered by user is 5. It is stored in num variable

At fourth iteration:

num >= 0 is true because 5 is greater than 0 so program moves to the body of loop

sum+=num; becomes:

sum = 35 + 5

sum = 35 + 5

sum = 40

count++; becomes:

count = count + 1

count = 3 + 1

count = 4

if(num>=max) means if(5>=20) this is false so

 max = num;  this remains:

max = 20

Lets say the next value entered by user is -1. It is stored in num variable

Now the loop breaks because num >= 0 is false because -1 is less than 0 so program moves to the statement:

printf("%d %d", sum/count,max);

This has two parts to print on output screen:

sum/count which is 40/4 = 10

max which is 20

So the output of the entire program is:

10  20

The screenshot of program along with its output is attached.

The program that takes any number of non-negative integers as input, and outputs the average and max is coded below.

The program written in Python that takes non-negative integers as input, calculates the average and maximum, and stops when a negative integer is encountered:

numbers = []

num_sum = 0

max_num = float('-inf')

while True:

   num = int(input("Enter a non-negative integer (enter a negative integer to stop): "))

   if num < 0:

       break

   numbers.append(num)

   num_sum += num

   max_num = max(max_num, num)

if len(numbers) > 0:

   average = num_sum / len(numbers)

   print("Average:", average)

   print("Max:", max_num)

else:

   print("No non-negative integers were entered.")

In this program, we start by initializing an empty list `numbers` to store the non-negative integers.

We also initialize variables `num_sum` to keep track of the sum of the numbers and `max_num` to track the maximum number encountered.

We then use a while loop that continues until a negative integer is entered. Inside the loop, we prompt the user to enter a non-negative integer. If the number is negative, the loop is terminated using the `break` statement. Otherwise, we append the number to the `numbers` list, update the sum `num_sum`, and check if it is greater than the current `max_num`.

After exiting the loop, we calculate the average by dividing the sum by the number of elements in the `numbers` list (which is obtained using the `len()` function). Finally, we print the average and the maximum value.

Learn more about Loop here:

https://brainly.com/question/14390367

#SPJ6

What are the functions of four registers?

Answers

Answer:

The four general purpose registers are the AX, BX, CX, and DX registers. AX - accumulator, and preferred for most operations. BX - base register, typically used to hold the address of a procedure or variable.

Explanation:

Which of the following stakeholders makes policies for a green economy?

Answers

Answer:

government is the answer

Assume a random number generator object named randGen exists. What are the possible values for randGen.nextInt(6)?
a. 0...5
b. 0...7
c. 1...6
d. 0...6

Answers

Answer:

a. 0...5

Explanation:

Given

randGen.nextInt(6)

Required

Determine the range of values

Using randGen object,

The syntax to generate a random integer is randGen.nextInt(n)

Where the range is 0 to [tex]n - 1[/tex]

In this case;

n = 6

So, range is 0 to 6 - 1

Range: 0 to 5

Hence;

Option A answers the question

anyone wanna be friends?

Answers

answer:
yes im sooo down !!

I would like to be friends! I’m down!

Other Questions
I dont know what to do, if someone could please help me & explain, youre the best! Which statement best describes what the Bill of Rights does for citizens rights? It revises them. It limits them. It amends them. It guarantees them. what is the volume of a marble that has a mass of 3.g and a Density of 2.7 g/ml ? make sure to round to the nearest tenth help!!!!!!!!!!!!!!!! The animals thought that perhaps there was dirt at the depths of the ocean, but they had never tried to reach the bottom before. One by one they tried to swim down, but their attempts were futile. Finally, the muskrat disappeared into the cold depth of the ocean. After a lengthy amount of time, he drifted to the surface with a tiny speck of earth in his hand. He appeared to be dead, but the animals prayed and chanted, and finally he stirred. The Earth-Diver was successful in bringing forth the soil to make the earth grow. zoe is 16 years old her brother is 3 years older then half her age . wright a numerical expression for her brother lukes age Postreading strategies are used...before reading a text.when reading for specific information.when reading for general meaning.after reading a text. pls help-10y + 18 = -3(5y - 7) + 5ywhat is y? Which excerpt from the call of the wild is an example of direct characterization What was the main way industrial inventors helped farmers What are the similarities and differences between translations, reflections, and rotations? Describe a real-world transformation? Give examples of two different transformations. (NEED ANSWER) 20 POINTS! YOU WILL GET BRAINLIEST!!Read the following sentence:Kris read about the Egyptian pyramids in his history book.Which of the following best corrects this sentence?A. Add a comma.B. Add an independent clause.C. Move the dependent clause.D. Move the prepositional phrase. Cool colors make us think of ________, ________, or ________.heat, sunshine, or firecold, water, or the skygrass, stop signs, or lavaspring, summer, or fall please help!!!!!!!!!! a line passes trough the points(-5,2) and(10,-1). Wich is the equation of the line most South Asians practiced which religions before the arrival of Islam How did the practice of trick-or-treating develop on Halloween? Which is a rational function?A. Y=x-5/2B. y=x^2-x+ 4c. y=2^xD. y=x-3/x^2 Which of the following are like terms the type of lymphocratic help the immune system destroy pathogen