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
Which of these might be an example of an advertisers target group
Eduardwww [97]
Where are the examples?

3 0
3 years ago
The collection of computer instructions and other files that constitute a piece of software is
lutik1710 [3]
The answer would be
A. Codebase

8 0
3 years ago
Read 2 more answers
Intellectual ______ is the legal term for ownership of intangible assets such as ideas, art, music, movies, and software.
SOVA2 [1]

Answer:

<u>Property</u>

Explanation:

Intellectual Property (IP) is the lawful protection of human idea/intellect by unauthorised users. These human intellects are intangible assets that have both moral and commercial value. They include ideas, art, music, movies, software e.t.c.

Common types of Intellectual property include

  • Copyrights
  • patents
  • Trade Marks
  • Trade Secrets
5 0
3 years ago
Read 2 more answers
What is the name of the virus that appears to be a legitimate program?
timurjin [86]
A virus or malware appearing/pretending to be a legitimate program is called a Trojan. 
3 0
3 years ago
A collection of entries posted on a web site and displayed in reverse chronological order (from newest to oldest entries), is kn
Zina [86]
A) Social Collaboration

Social Collaboration is a way for people to combine their information and make it easier to go through and to work well as a team.
7 0
3 years ago
Other questions:
  • Access controls are enforced automatically in FMS service routines that access and manipulate files and directories.
    9·1 answer
  • Where should you look for most objective and unbaised information
    15·1 answer
  • A web __________, such as internet explorer or mozillaâs firefox, allow users to access the world wide web.
    10·1 answer
  • In an interview, an appropriate response to "What is an example of one of your
    13·2 answers
  • A computer is defined by 4 specific criteri. Select all 4.*
    7·1 answer
  • The purpose of a function that returns "void" is:_________. A) To satisfy compiler warnings B) To package a repeated task as a f
    7·1 answer
  • Which role involves designing and creating advertisements for marketing purposes?
    14·2 answers
  • Help please<br>x + 1 = –x + (–5)​
    7·1 answer
  • 01:24:3
    11·1 answer
  • What is connected to the base unit in Desktop PC?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!