Question: This is your first project you will submit only one running Python file that displays an output similar to Figure 1 below. When writing your

This is your first project you will submit only one running Python file that displays an output similar to Figure 1 below.

When writing your code, assume you have taken at least 10 courses.

  • - Your program should ask you to enter the name of the course (3 letter abbreviation e.g. CIS) and course code - 3 digit integer number (e.g. 101) you will need to enter this information through a for loop .

  • - Randomly assign the number of credit hours for each course you enter, hint use either the randrang() or randint() method to give you integer numbers between 3 and 5 not including 5.

  • - Use a for loop, randomly enter your grades (integers only, hint use either the randrange() or

    randint() method to enter marks between 40 and 100),

  • - Use nested if statements to assign a letter grade for your marks.

  • - Then, assign the GPA for each course according to the scale given in the table below (enter your

    GPA for each course at the same time you assign the letter grades). [Note you can do all of this in a for loop that has many statements containing the nested if statement. Finally calculate the cumulative GPA.

  • - Use the following scale to help you write your code.

A+ 97 100 4.0 A 93 96 4.0 A- 90 92 3.7 B+ 87 89 3.5 B 83 86 3.3 B- 80 82 3.0 C+ 77 79 2.7 C 73 76 2.5 C- 70 72 2.0 D+ 67 69 1.7 D 63 66 1.5 D- 58 62 1.0 F < 57 0.0

  • - To calculate the cumulative GPA, you multiply the GPA from the table for each course with the number of credit hours for that course, then you do the same for all courses and add them together. Finally, divide by the total number of credit hours.

    Example. For your CIS 101 course, number of credit hours = 4, your score 97, your letter grade is A+, your GPA for this course is 4.0.

  • - Cummalative GPA = (course_credit_hour[i] * GPA[i]) /(Total credit hours for all courses).

  • - To format the cumulative GPA to two decimal points, see the following example:

    cumm_gpa_float = 3.14159

    formatted_cumm_gpa_float = "{:.2f}".format(cumm_gpa_float)

  • - At the top of the output, display your name and ID.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!