Write a program to define three variables to hold three test scores. The program should ask the user to enter three test scores and then assign the values entered to the variables. The program should display the average of the test scores and the letter grade that is assigned for the test score average. Use the grading scheme in the following table. 90 or greater 80-89 70-79 60-69 Below 60

Answers

Answer 1

Answer:  

It's always good to use if else with boolean expressions in such cases.

Explanation:

I have written a program  where I have used c# as programming language.

I used if else block with boolean expressions to enforce conditions to print the grades according to the average of test scores. I have used Logical And(&&) operator in boolean expressions so that all the conditions in if and if else  must be true

Here is the program:  

using System;

public class Test

{

   public static void Main()

   {

       int testScore1, testScore2, testScore3;

       Console.WriteLine("enter first testScore");

       testScore1 = Convert.ToInt32(Console.ReadLine());

       Console.WriteLine("enter second testScore");

       testScore2 = Convert.ToInt32(Console.ReadLine());

       Console.WriteLine("enter third testScore");

       testScore3 = Convert.ToInt32(Console.ReadLine());

       float avg = (testScore1 + testScore2 + testScore3) / 3;

       if(avg>=90)

       {

           Console.WriteLine("You got grade A");

       }

       else if(avg >=80 && avg <=89)

       {

           Console.WriteLine("You got grade B");

       }

       else if (avg >= 70 && avg <= 79)

       {

           Console.WriteLine("You got grade c");

       }

       else if (avg >= 60 && avg <= 69)

       {

           Console.WriteLine("You got grade D");

       }

       else if(avg< 60)

       {

           Console.WriteLine("You got grade E");

       }

       else

       {

           Console.WriteLine("Sorry, You failed");

       }

       Console.ReadLine();

   }    

}

Explanation of program:  

I created three variables named, testScore1, testScore2, testScore3 of datatype int. I prompted the user to enter three test score values. Each value is read using Console.ReadLine() . As the value entered is of type integer, I converted the  console read value into int using Convert method.  

In the next step, I calculated average using the formula.  

Now, Based on the average, I can calculate the grade according to the given grading scheme.


Related Questions

Write a program that prompts the user to enter the number of students and each student's name and score, and finally displays the student with the highest score and the student with the second highest score.

Answers

Answer:

  see attachment

Explanation:

You have not specified the language, or the details of the I/O form or prompts. Here is a program that does that, written in Wolfram language (the language of Mathematica).

It prompts separately for student name and student score. The minimum score is presumed to be higher than -99999. If only one student name is entered, the second output is that score with no name listed. There is no error checking.

We have elected to keep a list only of the two two scores, and to sort that list again each time a new entry is made.

__

The attachment shows the output of the program below the program listing.

What are the advantages and disadvantage of integers and floating numbers?

Answers

Answer:

Explanation:

Advantages of int and disadvantages of float are as following :-

1.Arithmetic operation on int variables are much faster than float variables.

2.int variables does not suffer from precision loss while float variable sometimes suffer from it.

Advantages of float variables and disadvantages of int variables are as following:

1.float variables can represent values between integers.While integers cannot do that.

2.Float can represent much greater range of values than integers.

An objective function in linearprogramming is a(n):

decisionvariable.
environmentvariable.
resultvariable.
independentvariable.
constant.

Answers

Answer: An objective function in linear programming is a decision variable.

Explanation: An objective function is a function which has the target towards the model whether it should be maximized or minimized according to the relation between the  variables present in the function. There are set of variables which are responsible for the controlling of objective function that is known as decision variables.

What is one property of a good hash code?

Answers

Answer:- Major property of a good hash code is that objects which are equal should return the same hash code .

Explanation: Hash codes is a numeric value which  is used for identify a object while a equality testing .Hash code can occupy the value of any length and then returns a fixed length value. The value of hash codes are variable.

If two objects are equal then by the method of equal(object) if the hashcode() function is called on both the objects , they produce the same value.

. Frequency band in which 99% of the total power resides iscalled _________

a. Power bandwidth

b. half power bandwidth

c. 3dB bandwidth

d. 4dB bandwidth

Answers

Answer:

Frequency band in which 99% of the total power resides iscalled Power bandwidth-a.

A jeweler designing a pin has decided to use five stones chosen from diamonds, rubies, and emeralds. In how many ways can the stones be selected?

Answers

Answer:

3,125 different possible ways

Explanation:

Great question, hopefully i can shed some light on the situation. There are a total of 5 stones. One by one they are randomly picked out of the bag. We need to find how many possible combinations there are for picking the stones out of the bag. We can solve this by raising the amount of stones in the bag to its own power like so,

[tex]5^{5} =  3,125[/tex]

So now we can see there are 3,125 different possible ways of selecting the stones.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

In a database, data is stored in spreadsheets which have rows and columns.

A.

True

B.

False

Answers

The answer is A. True.
Final answer:

A spreadsheet is a collection of data organized into rows and columns. However, it has limitations compared to relational databases in terms of data organization and accessibility.

Explanation:

A spreadsheet is a collection of data that is organized into rows and columns. Each column represents a field or attribute, while each row represents a record or data instance. While spreadsheets can function as a type of database, they have limitations in terms of data organization and accessibility compared to relational databases which use a tabular structure and allow for easier reorganization and access of data.

define the role of cache memory in computers.

Answers

Answer:

Cache memory is relatively small in size as compared to the main memory. The cache memory stores programs, variables which are frequently used by the processor.

Explanation:

The cache memory is placed very close to the processor so that the programs and variables can be accessed very quickly as and when required by the processor. The size of the cache memory is small and also cost more. There is also a secondary cache in many systems which enables to store more programs which cannot be store in the primary cache.

1) All the elements of an array in Java MUST conform to the same data type.

a) True
b) False

Answers

Answer:

TRUE

Explanation:

The array is allow to store the multiple values but with same data type.

It cannot store element with different data type.

For example:

int array[] = {1, 'b', 8.7, 9, 'z'}

the above is wrong way to declare the array.

the correct ways is:

int array[] = {1,2,3,4};

float array[] = {1.2, 3.4, 9.6};

we can store only same data type element in multiple tiles.

: Differentiate between serial and parallel data transfer withat least one example of each from computer sciencedomain.

Answers

Answer:

In serial communication transfers one bit of data at a time, while parallel communication transfers many bits of data at the same time. Serial communication transmits the data bits sequentially, while parallel communication transmits data bits simultaneously, allowing greater amounts of data to be transferred.

-Serial communication is the one used to communicate the Arduino with the Computer through the USB cable.

-An example of a parallel port is the printer port. The Parallel Port was only created and used in the printers interface and the computers.

Explanation:

In serial communication, each bit is sent by its own clock flank where conditions are defined after each byte, if it is synchronous or asynchronous. In parallel communication there is only one single clock flank where the information is sent where it is an advantage to use it where there are several input or output data.

I hope it's help you.

HTML uses formatting codes called ____, which specify how the text and visual elements on a Web page will be displayed in a Web browser.
Answer
entities
schema
tags
blocks

Answers

Answer:

tags

Explanation:

HTML tags provide the formatting information for the web page. Web Browsers like internet explorer, firefox, google chrome interpret these tags and render the page accordingly. For example: content enclosed within <i> and </i> will be rendered in italicized format.Similarly content enclosed within <b> and </b> will be rendered in bold.

The ____ in a binary tree is the number of branches on the path from the root to the node.

A.
size of a node

B.
level of a node

C.
depth of a node

Answers

if i remember correctly from class, it’s c. the depth of a node

What are the advantage of transistors over vacuum tubes?

Answers

Answer:

Transistors are comparatively cheaper and consume less power as compared to vacuum tubes.

Explanation:

Transistor when compared to vacuum tubes perform much faster processing, are small and lightweight which enables it to integrate them into circuits.

They also show a high amplification factor than vacuum tubes.

Write a Java program that calculates and prints the monthly pay check for an employee. The net pay is calculated after taking the following deductions:

Federal Income Tax: 15%
State Tax: 3.5%
Social Security Tax: 5.75%
Medicare/Medicaid Tax: 2.75%
Pension Plan: 5%
Health Insurance: $75.00

Answers

Final answer:

A Java program can calculate an employee's net pay by deducting federal, state, Social Security, Medicare/Medicaid taxes, pension plan contributions, and health insurance costs from the gross pay. The net pay is then output as the amount the employee would receive in their paycheck.

Explanation:

To calculate the net pay for an employee after deductions, we need to write a Java program that considers the following deductions: Federal Income Tax at 15%, State Tax at 3.5%, Social Security Tax at 5.75%, Medicare/Medicaid Tax at 2.75%, a pension plan deduction at 5%, and a fixed amount for health insurance at $75.00.

Here is a simple example of how this Java program might look:

public class PaycheckCalculator {
   public static void main(String[] args) {
       double grossPay = 5000; // Example gross pay
       double federalTax = grossPay * 0.15;
       double stateTax = grossPay * 0.035;
       double socialSecurityTax = grossPay * 0.0575;
       double medicareTax = grossPay * 0.0275;
       double pensionPlan = grossPay * 0.05;
       double healthInsurance = 75;

       double netPay = grossPay - (federalTax + stateTax + socialSecurityTax + medicareTax + pensionPlan + healthInsurance);

       System.out.println("Net pay: $" + netPay);
   }
}

This program calculates each of the deductions based on the gross pay, subtracts them from the gross pay, and prints out the resulting net pay.

Computer Science (IT). My lecture was asking to do the final year project but i still haven't got the title. Does anyone can give me good recommendation of what the project i should do for my final year project?

Answers

Answer:

Hi, of course.

Project ideas:

Household temperature monitoring  Internet of things

Registration of people entering a shopping center during peak hours  with Internet of things

Smart houses with Internet of things

Explanation:

At the moment I am working on projects related to Internet of things and it is a fantastic world in which to enter, try searching  Internet of things fundamentals on yt and you soak up the subject, then you can start looking on the first hello world in arduino with Internet of things.

In this moment I'm working on a gps tracker for a public buses and it's not too hard as it's sound.

I hope it's help you

Choose a final year project that interests you and showcases your skills, such as machine learning, web development, mobile apps, cybersecurity, or IoT. Engage with faculty for guidance and consider past coursework to generate ideas.

Here are some recommended project ideas:

Machine Learning Algorithms: Develop a project that uses machine learning algorithms to solve a real-world problem, such as predicting stock market trends or diagnosing medical conditions based on patient data.Web Development: Create a comprehensive web application, perhaps an e-commerce site or a social networking platform, focusing on both front-end and back-end development.Mobile Application Development: Build a useful mobile app, such as a fitness tracker, budgeting tool, or educational game. Include features that integrate with various APIs for an enhanced user experience.Cybersecurity: Design a system for detecting and preventing cybersecurity threats, which could involve creating a new type of firewall, intrusion detection system, or a secure communication protocol.Internet of Things (IoT): Develop an IoT solution, like a smart home automation system or an environment monitoring network, utilizing sensors and cloud computing for data analysis and real-time monitoring.

When choosing a project, consider what interests you the most and what areas you want to become more proficient in. Engage with faculty members who have expertise in your area of interest for mentorship and guidance. Additionally, reflect on past coursework that you found particularly engaging or challenging, as it might spark project ideas.

Write a conditional expression that assign the value 0 to a credits variable if it is less than 0; otherwise the value of the credits variable remains unchanged.

Answers

Answer:

credits = (credits < 0) ? 0 : credits;

Explanation:

This is the ternary conditional operator.

Answer:

void updateCredit(float credit){

if credit < 0.0

credit = 0.0;

}

Explanation:

I am going to write a C function for this.

The input is your credit value, and it has just a conditional to verify if it is not negative.

void updateCredit(float credit){

if credit < 0.0

credit = 0.0;

}

Given an array A of n + m elements. It is know that the first n elements in A are sorted and the last m elements in A are unsorted. Suggest an algorithm (only pseudo code) to sort A in O(mlogm +n) worst case running time complexity. Justify.

Answers

Answer:

Explanation:

We can divide array A into two arrays B , C

B would contain the sorted n elements.

C would contain the unsorted m elements.

Now we can sort C using merge sort with worst time complexity mlogm.

When you will have array C sorted you can concatenate with B and put it back in A.

Non proprietary standard is also termed as____________

a. De facto standard

b. Le facto standard

c. Pre facto standard

d. Non facto standard

Answers

Answer: Option A) De facto standard

Non proprietary standard is also termed as de facto standard.

Explanation:  Non proprietary standard is also termed as de facto as when the proprietary standard such as window are widely used, then it becomes  de facto standard. When de facto standard is referring in terms of computers, it is an accepted application, design or language standard that is used in industry but not officially recognized.  

An example of de facto standard is paper clip ion used in e-mail to represent an attachment.  

The ____ method takes a String argument and returns its double value.

a.
parseString()

b.
returnDouble()

c.
parseInt()

d.
parseDouble()

Answers

Answer:

d

Explanation:

In java you can use pareDouble(string str) to convert the string into double.

for example if you have string like this.

string str  = [tex]"16.45" ;[/tex]

then you can use

double mydouble = Double.parseDouble(str);

print(mydouble); //it will print out 16.45

but if the string would not be able to be parsed into double then you will get an error.

Write a recipe that stores the sum of the numbers 12 and 33 in a variable named sum. Have your recipe display the value stored in sum.

Answers

Answer:

#include<iostream>

using namespace std;

int main(){

   int sum = 12+33;

   cout<<"The sum is: "<<sum<<endl;

}

Explanation:

First include the library iostream in c++ program for input/output.

Then, create the main function and declare the variable sum as integer type and store the sum of two given values.

After that, display the result store in the sum variable on the screen by using the instruction cout.

True / False
The exponent in floating point is stored as a biased value.

Answers

Answer:

True

Explanation:

The bias value present in a floating point number deals with the positiveness and negativeness of the exponent part for a floating point number.  The bias value for a floating point number is 127. It means that 127 is always needed to be added to the exponent part of any floating point number.

In a single precision floating point number, we need 8 bits to store the exponent. Rather than storing it as a signed two's complement number, it is easier to simply add 127 to the exponent (because the lowest value that can be in 8 bit signed is -127) and simply store it as an unsigned number. If the stored value is bigger than the bias then it would mean the value of the exponent is positive otherwise it is negative, but if they are equal then it is 0.

Give brief comparison of Broadcast, Unicastand Multicast?

Answers

Answer:

In broadcast the message is transmitted from one to all , in uni cast we have one to one transmission and in multicast we have transmission from one to many.

Explanation:

If we take the example of a simple messaging application it will be clear. If a message is exchanged between one person to another, then it is uni casting. If a person sends a message to all the persons in his contact list then it is broadcasting and  if a person sends messages to select persons in his contact list then it is multi casting. In multi casting management of the group is required regarding who can receive messages which is not required in broadcasting.

What is the role of a Chief Information Officier in anorganization?

Answers

Answer and Explanation:

There are several roles of a Chief Information Officer in any organization and these are as follows:

He must fulfill his responsibility as a business leader.He must be able to make executive decisions regarding sales and purchase related matters. He must be able to deal with all the Information Technology related problems.He must be able to recruit the best candidates in the best interest of the organization.He is required to map out the ICT policy(includes procurement, external and internal standards of an organization, future proofing) and ICT strategy.He must be able to write up ICT policy  with detail of its utilization and application.He must possess organizational skills

Why cli and sti instructions are used during hooking aninterrupt?

Answers

Answer: Cli(Clear interrupt flag ) and sti(set interrupt flag) instructions are used for clearing the flag and setting or enabling a flag respectively while hooking an interrupt.

Explanation: During the action of hooking an interrupt,there are certain interruptions while changing of real time interrupt vector and to avoid those interruptions two instructions are used that is cli ans sli. Cli is present for the clearing or disabling the interrupt flag and sti is used for setting or enabling a interrupt flag.

Programs that are embedded in a Web page are called Java ____.

a.
consoles

b.
windowed applications

c.
applications

d.
applets

1 points

Answers

Answer:

applets

Explanation:

Java applets are dynamic programs that can be embedded on a webpage and run on a web browser like internet explorer,firefox or google chrome. The code for applets is developed using java programming language and facilitates interesting and complex display entities to be included as part of the web page. HTML provides a special tag called <Applet> for providing details of the applet.

write a program that convert binary number to decimal. I mean the input should be binary number and the output decimal number!!.

Answers

Answer:

#include<iostream>

#include<math.h>

using namespace std;

//main function

int main(){

   //initialization

   long b1;

   int d1=0,count_pos=0;

//display the message

   cout<<"Enter the binary number: ";

   cin>>b1;  //store the value

   //loop for take the digit one by one

   while(b1!=0){

       int rem1 = b1%10;

       d1 = d1 + rem1*pow(2,count_pos);

       count_pos++;

       b1 = b1/10;

   }

   //display the output

   cout<<"The decimal number is: "<<d1<<endl;

}

Explanation:

Create the main function and initialize the variables. Then, display the message on the screen by using the instruction cout and then, store the input enter by the user into the variable. Here, the variable declares with type 'long' because of the size of the input.

After that, we take a while loop for splitting the binary number into the digits and then we can do the operation.

Let's understand how you can convert binary to decimal with an example:

let the binary number is 1001:

decimal number is [tex][tex]1*2^{3}+0*2^{2}+0*2^{1}+1*2^{0}=9[/tex][/tex]

we put the same algorithms in the code. split the number into digit and then multiply with n raised to the power of 2 here, n is the position of digit from left to right.

NOTE: Position starts from zero.

and then, add the values. this process continues until the number is not zero.

After that, display the output on the screen.

What are fields? Instance variables? object? methods?

Answers

Answer:

Explained

Explanation:

Fields: Fields represent data and should be a noun. It should begin with a lower case letter.

Instance variable: it is a variable defined in class but outside the constructor and the method. instance variables are created when an object is instantiated.

Object: An object is the basic unit of object oriented programming language.and represents the real life entities. An object consists of state behavior and properties.

Method: Method in a collection of statements that perform some specific task and return the result to the caller.

Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values into callsReceived and operatorsOnCall and print out the number of calls received per operator (integer division with truncation will do).

Answers

// c++ code to read the recieved calls

cout<< " Enter the calls recieved :";

cin>>callsRecieved;

cout<< " Enter operator on call : ";

cin>>operatorsOnCall;

// calculating the call per operator

calls_per_operator = callsRecieved/operatorsOnCall;

// printing the vaule.

cout<<" Calls recieved per operator are : " << calls_per_operator <<endl;

Final answer:

To find the number of calls received per operator, read inputs for callsReceived and operatorsOnCall, then divide callsReceived by operatorsOnCall using integer division and print the result.

Explanation:

To calculate the number of calls received per operator, you will first need to read values into the variables callsReceived and operatorsOnCall. You can do this using an input method appropriate for the programming language you're using (e.g., scanf in C, cin in C++, or input() in Python). Once you have these values, you perform the division of callsReceived by operatorsOnCall and print the result. Here is an example code snippet in Python:

# Read the number of calls received and the number of operators on call
callsReceived = int(input('Enter the number of calls received: '))
operatorsOnCall = int(input('Enter the number of operators on call: '))

# Calculate the calls per operator with integer division
callsPerOperator = callsReceived // operatorsOnCall

# Print the result
print('The number of calls received per operator is:', callsPerOperator)

Note that integer division with truncation is used (// in Python) to get an integer result.

When you declare a method as abstract method ? Can I call a abstract method from a non abstract method ?

Answers

Answer: A method without body is called abstract method. A abstract method can be called from a non abstract  class or method provided it is inherited using a subclass.

Explanation:

An abstract method is a method which does not have a body, it just has opening and closing curly braces. A class having an abstract method is also declared as abstract class. We cannot make an object of the abstract class.

example : public abstract float multiply(float x, float y);

is an example of abstract method.

calling an abstract method from a non  abstract method is possible provided it is inherited by a non abstract subclass.

True / False
Some versions of the Von Neumann model include the stored program concept, but not all of them.

Answers

Answer: True

Explanation:

The Von Neumann model is based on the concept of stored program where both of the program and instruction data are stored in the same electronic memory. Though it is still used in many models but due to the Von Neumann bottleneck we have the introduction of the secondary memory.

Other Questions
How was Japan's colonization of Asia similar to Europe's colonization of Africa? please answer its due today Square lMNO is shown in the diagram below what are the coordinates of the midpoint of a diagonal LN PLEASE HELP ASAP!!!Which statement best describes the problem statement below?Vision: We want to sell more products.Issue: It may be that we have too many salespersons.Method: Design new software to track how much each salesperson sells. What two stereoisomeric alkanes are formed in the catalytic hydrogenation of (Z)-3-methyl-2-hexene? Draw and label the alkanes. In this reaction, what are the relative amounts of each of the two alkanes generated? do low-income patients sustain more amputations do to diabetes than high-income patients do Write equations for the vertical and horizontal lines passing through the point . (7,5) Factor completely 21x3 + 35x2 + 9x + 15. (3x 5)(7x2 3) (3x 5)(7x2 + 3) (3x + 5)(7x2 3) (3x + 5)(7x2 + 3) What makes a good thesis statement Anthony purchased 6 fruit bars and 3 chocolate-nut bars for a camping trip. He spent $4.12 on the bars. Anthony wrote the following equation: 6x+3y=4.12 . What did he define as the variable x? When 84-year-old Jim was younger, he never wanted to talk about his experiences in the Korean War. Over the last 10 years he openly and proudly talks about his experiences, attends veteran reunions, and wears his Purple Heart hat proudly. Jim is in (A) Integrity versus despair(B) the invincibility fable(C) maturation(D) second puberty (E) filial devotion. Which sentences contain adverbial clauses? Sumi panicked when she couldn't meet her deadline. Rob kicked the ball, which went flying over the wall. However hard she tried, Tammy could not remember where she put her purse. When her roommates were being loud, Lisa went to the library. Two fair tetrahedral( 4 faces each ) dice are thrown. On one die, the faces are numbered 1,2,3,4. On the other die, the faces are numbered 1,2,4, and 8. What is the probability that the sum of the face down numbers will be divisible by 3 Reflect the given the coordinate points over the line y=x. F(5,3) G(5,2) H(2,2) F( , ) G( , ) H( , ) MAJORRRR HElppp Plutonium-210 has a half-life of 140 days. Use the formula , where , is the remaining mass, is the original mass, and is the half-life, to determine how long it takes to reduce 300 milligrams of plutonium-210 to 200 milligrams.Arrange the steps in the right order to solve the problem. How did women's roles change as a result of the industrial revolution in europe? A. Women earned the right to vote in most democracies by organizing protests.B. Women gained increased economic independence by working in factories.C. Women earned salaries equal to mens for the first time in history.D. Women largely controlled agriculture by replacing male farmers who moved to cities. The equator gets direct sunlight about half of the year. True False what does x - 5x equal Use the substitution method to solve the system of equations. Choose thecorrect ordered pairx + 2y = 12y = x + 3O A. (5,8)O B. (5,2)O C. (2,1)O D. (2,5) What is the main purpose of the National Security Council?A to advise Congress about matters related to the militaryB to direct the Department of Homeland SecurityC to direct peacekeeping mission in foreign countriesD to advise the President about the safety of the country How do calcium channel blockers work in the body?