15.4k views
1 vote
Going to Grad School! In the College of Computing and Software Engineering, we have an option for students to "FastTrack" their way into their master’s degree directly from undergraduate. If you have a 3.5 GPA and graduate from one of our majors, you can continue on and get your masters without having to do a lot of the paperwork. For simplification, we have four undergraduate degrees: CS, SWE, IT, and CGDD – and three masters programs: MSCS, MSSWE and MSIT. For this assignment, you’re going to ask the user a few questions and determine if they qualify for the FastTrack option.

Sample Output:
Major: Frogmongering
GPA: 3.9
Great GPA, but apply using the regular application.
Sample Output #2:
Major: SWE
GPA: 3.3
Correct major, but GPA needs to be higher.
Sample Output #3:
Major: IT
GPA: 3.5
You can FastTrack.
Sample Output #4:
Major: Study Studies
GPA: 0.4
Talk to one of our advisors about whether grad school is for you.

1 Answer

4 votes

Answer:

The programming language is not stated. However, I'll answer this question using Python programming language.

The program uses no comments; find explanation below

i = 0

while not (i == 4):

print("Sample Run: #"+str(i+1))

Major = input("Major: ")

GPA = float(input("GPA: "))

if not (Major.upper() == "SWE" or Major.upper() == "IT" or Major.upper() == "CGDD" or Major.upper() == "CS"):

if GPA >= 3.50:

print("Great GPA, but apply using the regular application")

else:

print("Talk to one of our advisors about whether grad school is for you")

if (Major.upper() == "SWE" or Major.upper() == "IT" or Major.upper() == "CGDD" or Major.upper() == "CS"):

if GPA >= 3.50:

print("You can FastTrack.")

else:

print("Correct major, but GPA needs to be higher.")

i = i + 1

Step-by-step explanation:

Line 1 of the program initializes the sample run to 0

Line 2 checks if sample run is up to 4;

If yes, the program stops execution else, it's continues execution on the next line

Line 3 displays the current sample run

Line 4 and 5 prompts user for Major and GPA respectively

Line 6 to 10 checks is major is not one of CS, SWE, IT, and CGDD.

If major is not one of those 4 and GPA is at least 3.5, the system displays "Great GPA, but apply using the regular application"

If major is not one of those 4 and GPA is less than 3.5, the system displays "Talk to one of our advisors about whether grad school is for you"

Line 11 to 15 checks is major is one of CS, SWE, IT, and CGDD.

If major is one of those 4 and GPA is at least 3.5, the system displays "You can Fastrack"

If major is one of those 4 and GPA is less than 3.5, the system displays "Correct major, but GPA needs to be higher."

The last line of the program iterates to the next sample run

User CzLukasss
by
4.4k points