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
Under which menu option of a word processing program does a star appear?
Citrus2011 [14]

A callout is a type of text box that also includes a line for pointing to any location on the document. A callout appears under the SHAPES <span>menu of the word processing program. The answer that completes this statement is the word "shapes". Hope this answers your question. </span>
3 0
3 years ago
Read 2 more answers
What is the potential outcome for an author if she uses a word without realizing its connotation? she may write something that s
zubka84 [21]

A potential outcome for an author who uses a word without realizing its connotation is: A. she may write something that she does not mean.

<h3>What is connotation?</h3>

Connotation refers to the quality, feeling or an idea which a word brings to the mind of a reader or listener, as well as its literal, dictionary or primary meaning.

This ultimately implies that, a potential outcome for an author who uses a word without realizing its connotation is that he or she may write something that she does not mean or pass across an information she didn't intend to.

Read more on connotation here: brainly.com/question/20236939

#SPJ1

3 0
2 years ago
Task 7: The following is a quiz program that asks the us-
Leni [432]

Answer:

peread

Explanation:

7 0
3 years ago
Tyra is peer conferencing about her project with a friend. Tyra's friend provided feedback that Tyra does not agree with. What s
natulia [17]

Answer:

Be kind and thankful

Explanation:

If Tyra does not agree with her friend's feedback, she does not have to say it outrightly to her friend. She has to use softer words to disagree. This is where being kind comes in.

Her friend has made efforts by providing this feedback Even if it is not exactly what she wants to hear. It would be polite for her to say thank you.

Then she has to respectfully disagree to avoid coming off as someone who is totally unreceptive of the opinion of others.

6 0
3 years ago
1.Which of the following class definitions defines a legal abstract class?a. class A { abstract void unfinished() { } }b. class
xxMikexx [17]

Answer:(c) abstract class A { abstract void unfinished(); }

Explanation:

A legal abstract class must have the keyword abstract before the class and an abstract class has abstract functions with the keyword abstract written and a void as the return type.

8 0
4 years ago
Other questions:
  • Advantages of a personal area network
    5·1 answer
  • What does ACCU stand for?
    13·2 answers
  • Free 100 point to first to answer
    5·2 answers
  • What is the 5 basic steps of computer programing?
    6·1 answer
  • What are the advantages to using a linked implementation as opposed to an array implementation?
    8·1 answer
  • VOTE: STARWARS, STAR TREK, MARVEL, STRANGER THINGS. OR IT ?
    15·2 answers
  • Multitasking systems _____.
    8·1 answer
  • Two friends can share 100 songs from their Bluetooth enabled mobile devices
    13·1 answer
  • How to save an edited document.​
    6·1 answer
  • A program that is used to view websites is called a​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!