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
What are comments meant to do?
docker41 [41]
Comment<span> (computer programming) ... In computer programming, a </span>comment<span> is a programmer-readable explanation or annotation in the source code of a computer program. They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters.</span>
8 0
3 years ago
Write a function ComputeVal that takes two integer parameters and returns the product of the two parameters plus 9. Ex: ComputeV
Romashka-Z-Leto [24]

Answer:

#include <iostream>

using namespace std;

/* Your code goes here */

int main() {

  int input1, input2;

  int result;

 

  cin >> input1;

  cin >> input2;

 

  result = ComputeNum(input1, input2);

 

  cout << result << endl;

  return 0;

Explanation:

6 0
2 years ago
Types of network model​
dexar [7]

Answer:

OSI Model and TCP/IP Model

Explanation:

4 0
2 years ago
You are writing an email to a potentional employer about a job opportunity. What can you do to make sure the email reflects your
Lina20 [59]
You want to use proper etiquette and be polite, do not call them by their first name and always refer to them as Mr., or Mrs. Use an extended vocabulary and do not talk about yourself.  If you have proper grammar, depending on the job, that can be seen as intelligence. And always use an appropriate closing that is respectful. Such as, Sincerely, John Doe.
4 0
3 years ago
Read 2 more answers
Which service works in conjunction with EC2 Autoscaling in order to provide predictive scaling based on daily and weekly trends
Lunna [17]

The service that works in conjunction with EC2 Autoscaling in order to provide predictive scaling based on daily and weekly trends is target tracking.

<h3>How can I employ Predictive Scaling with target tracking? </h3>

Predictive Scaling works is known to be one that works in line with target tracking. They both help to make one's EC2 capacity to change more better to one's incoming application traffic.

Note that target tracking scaling policies is one where a user has to select a scaling metric and set a target value.

Learn more about Autoscaling  from

brainly.com/question/17661222

4 0
2 years ago
Other questions:
  • David would like to send a letter to more than one hundred people. He would like the letter to have names and addresses inserted
    7·1 answer
  • How do you add text to a blank slide layout?
    5·2 answers
  • Write a program that records high-score data for a fictitious game. the program will ask the user to enter five names, and five
    12·1 answer
  • Write a program called DeliveryCharges for the package delivery service in Exercise 4. The program should again use an array tha
    9·1 answer
  • What is the awnser ?
    11·1 answer
  • 4. Give four reasons why a laptop computer is more expensive than a desktop computer of the
    10·1 answer
  • ARGENT !!20 POINTS <br> А ________ translates commands from a computer to draw lines on paper.
    10·2 answers
  • The History feature of a browser enables you to retrace your browsing history over a short period of time. (1 point) True False
    9·1 answer
  • I have the requirements for Ace rank on Brainly but hasn't given me it yet. Does it just take longer than normal ranks or someth
    15·2 answers
  • You want to add a caption to a table. which tab contains this option?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!