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
blsea [12.9K]
4 years ago
7

B. Write a function that takes one double parameter, and returns a char. The parameter represents a grade, and the char represen

ts the corresponding letter grade. If you pass in 90, the char returned will be ‘A’. If you pass in 58.67, the char returned will be an ‘F’ etc. Use the grading scheme on the syllabus for this course to decide what letter to return.
Computers and Technology
1 answer:
9966 [12]4 years ago
3 0

Answer:

#include <iostream>

#include <cstdlib>

using namespace std;

char grade(double marks){

   if(marks>=90)

   {

       return 'A';

   }

   else if (marks >=80 && marks<90)

   {

       return 'B';

   }

   

   else if (marks >=70 && marks<80)

   {

       return 'C';

   }

   

   else if (marks >=60 && marks<70)

   {

       return 'D';

   }

     else if ( marks<60)

   {

       return 'F';

   }

}

int main()

{

   double marks;

cout <<"Ener marks";

cin >>marks;

char grd=grade(marks);

cout<<"Grae is "<<grd;

return 0;

}

Explanation:

Take input from user for grades in double type variable. Write function grade that takes a parameter of type double as input. Inside grade function write if statements defining ranges for the grades. Which if statement s true for given marks it returns grade value.

In main declare a variable grd and store function returned value in it.

You might be interested in
Convert the following denary numbers into binary using 8-bit register:
Mariana [72]

Answer:

1) 3

2) 5

3) 21

4) 57

5) 76

It would be much more easier if there were a grid containing all the numbers.

8 0
3 years ago
How does machine learning help to make modern Web Application Firewalls more effective? (Choose two.)
MissTica

Answer:

Option(a) and option(d) are the correct answer for the given question.

Explanation:

In this question options are missing so the options of this question is given below.

a Behaviour analysis can be done at the machine speeds.

b Search results are returned by the quicker than using traditional method of  

filtering

c Adapted the ever-changing attributes of an threat.  

d choose the most appropriated web application for the given task.

Web Application Firewalls are the effective which helps in learning for the machines to make it modernized. So, that's why the analyzing of the behavior could be done at the speed of the machine and also select that appropriate web applications for the following tasks. That's why the following options are true for the given question.

8 0
4 years ago
Describe a situation involving making a copy of a computer program or an entertainment file of some sort for which you think it
Margaret [11]

Answer:

Copying anything may be the computer program or an entertainment file, it is not a good thing as the original developers or the writers are going to feel bad since their hard work is being used by others without letting them know. However, if you are using it for academic purposes, or give them credit in your work, then the original writer will not feel that bad as he is being credited, and hence you can reuse in that case definitely, but always ensure to give the credit to the original writer.

As an example, if a film is copied like many in the past the Directors always feel bad, and they have the reason for feeling bad. The same thing is to technology.

Explanation:

The answer is self explanatory.

8 0
4 years ago
PYTHON
Nina [5.8K]

Answer:

This is one of the efficient ways to find the number of occurrences of a given number in a list:

<h3><u>def find_num(arr,n):</u></h3><h3><u>    return len([count for count in arr if count == n])</u></h3><h3><u>print(find_num([0,1,1,1,0],1))</u></h3>

If you want a simpler version, you can try this:

<h2><u>def find_num(arr,n):</u></h2><h2><u>    count = 0 </u></h2><h2><u>    for i in range(len(arr)): </u></h2><h2><u>        if arr[i]==n: </u></h2><h2><u>            count += 1 </u></h2><h2><u>    return count</u></h2><h2><u>print(find_num([0,1,1,1,0],1))</u></h2>

This is the simplest method:

<h2><u>arr = [0,1,1,1,0]</u></h2><h2><u>print(arr.count(1))</u></h2>

I think I gave you enough examples. This should get you started off easily.

If you need an explanation, I am happy to help you. BTW I started python 6 months back so even I am pretty new to this.

4 0
3 years ago
I need it ASAP, brainliest to whoever answers correctly!
velikii [3]

Answer:

E

Explanation:

i think it is E because if you think about it they don't make everything accurate on normal mapping its just to give you an idea of where to go or find.

6 0
3 years ago
Other questions:
  • Which of the following would an interactive media proffessional must likely need
    9·1 answer
  • he function below takes one parameter: a list of strings (string_list). Complete the function to return a new list containing on
    5·2 answers
  • A video game character prefers to take enemies on from a distance. What skills might such a character have?
    11·2 answers
  • What kinds of online behaviors could be considered cyberbullying?
    7·2 answers
  • PLEASE HELP
    9·2 answers
  • Programs are normally stored in ________ and loaded into main memory as needed. the input device the output device secondary sto
    15·1 answer
  • Points! taga pilipinas ba kayo?​
    10·1 answer
  • What should Anthony use to determine his available study hours for an upcoming project? LOOK AT THE PICTURE
    8·2 answers
  • What do other people think of e.t <br> in the movie E.T
    5·1 answer
  • Draw and implement of an organization which have 125 employees. use the following features 1.email services 2.lan communication
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!