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
seropon [69]
3 years ago
6

Create a program with a script that calls the following functions: getinput, calculateGPA, createBor, and printResults. The prog

ram is to ask the user how many semesters they have received grades in college. It will then will ask for each semesters GPA and number of units taken. Be sure to include an error check to ensure that all GPA's are between 0.00 and 4.00. 3. The script will then call the function, calculateGPA, to find the cumulative GPA for the user. Next, make a function, createBar, that creates a bar graph showing each GPA entered by semester. Please note that units do not need to be included/displayed. Finally, be sure to print the results to the screen in a user-friendly manneralhiv When printing the results, depending on the cumulative GPA, provide a comment based on how they are progressing through college. -3 your are averag How many semesters in Coege what was your semester 1 &PA, How many mids did yow tke tor semester 1 ?
Computers and Technology
1 answer:
Licemer1 [7]3 years ago
8 0

Answer:

The script is given below

Explanation:

%%driver

[grades , num_semester ] = getInput( ) ;

gpa = calculateGPA(grades , num_semester) ;

printResult( gpa) ;

createBar( num_semester , grades ) ;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [grades , no_semester] = getInput()

no_semester = input("How many semesters in college " );

for i = 1: no_semester

grades(i) = input( " Enter semester GPA ") ;

if( grades(i) > 4 && grades(i) < 0 )

disp( " Entered Grades are out Of Bounds ") ;

end

 

end

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function GPGA = calculateGPA(grades , no_semester )

sum = 0 ;

for i = 1 : no_semester

 

sum = sum + grades(i) ;

 

end

 

GPGA = sum/( no_semester);

 

 

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function bargraph = createBar( semester_num , grades )

 

bargraph = bar( grades, semester_num) ;

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function f = printResult( gpga )

 

fprintf( " Your GPGA is : %d \n " , gpga);

 

if( gpga >= 3 && gpga <=4 )

fprintf( " exception good work ") ;

 

end

if( gpga >= 2 && gpga <= 3)

fprintf( " You are average " ) ;

end

if( gpga >= 1 && gpga <= 2 )

fprintf( " you FAIL" ) ;

end

end

You might be interested in
When planning your website, what is one of the key things you should consider
Alex_Xolod [135]

You should definitely consider what kind of audience you are appealing to. For example, if you were running a business based on cosmetic products you may want to focus your website on self-care and makeup tips rather than something like cooking. By making your website direct about what you offer, the better the audience will understand. This will make your website succeed. Hope this helped :))

4 0
2 years ago
Read 2 more answers
How does a junction table handle a many-to-many relationship?
faltersainse [42]

Answer:

two" (and any subsequent words) was ignored because we limit queries to 32 words.

Explanation:

please mark as brainliest

7 0
3 years ago
Which role is delegated to personnel of the IT department and is responsible for maintaining the integrity and security of the d
enyata [817]

Correct question.

Which role is delegated to personnel of the IT department and how is responsible for maintaining the integrity and security of the data?

Answer:

<u>data custodian</u>

<u>Explanation:</u>

Remember, every organization generates data, and large organizations generate even larger data.

Hence, the role of a data custodian in an organization requires He implements measures to protect the organization's data, store and backup the data, as well as granting access to the data to authorized persons when needed.

3 0
2 years ago
Which of the following is the largest unit of information?
Mila [183]
What are the choices?

5 0
3 years ago
Read 2 more answers
Why doesn't the ad load ?
baherus [9]
Try refreshing the page, if not restart your device check your internet etc.
3 0
2 years ago
Read 2 more answers
Other questions:
  • Consider the following classes:
    8·1 answer
  • Într-o curte sunt G găini și O oi. Să se determine numărul de capete și numărul de picioare din curte.
    13·1 answer
  • Spreadsheet software creates a ____, composed of a grid of columns and rows
    5·1 answer
  • Electricity is moved from place to place a long __________​
    14·2 answers
  • To the following is not a network connection LAM MAN SAN WAN
    9·1 answer
  • A Raycast returns a float that tells you how far away an Object is
    8·1 answer
  • Friday Night Funkin Fans, does this count as a leak if I share it?
    13·2 answers
  • I think you have been doing a great job but you haven’t been signing many people up for our new service feature I want you to se
    8·1 answer
  • Write a paragraph discussing privacy issues on the internet<br> and their impact on human lives.
    9·1 answer
  • Write a program that takes a string as an input. If the string entered is equal to
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!