Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON PLEASE You are trying to update your resume so that you can apply to summer internships. It's been a while, and you've been taking

PYTHON PLEASEimage text in transcribed

You are trying to update your resume so that you can apply to summer internships. It's been a while, and you've been taking a lot of classes, so your GPA must have changed quite a bit. You log into DegreeWorks and you discover that the IT department implemented a sentient robot on the website that automatically calculates your GPA in three ways: 1. by looking at all classes (Cumulative GPA) 2. by looking at only major/SBC classes (Major GPA) 3. by looking at only major classes (Department GPA) The robot gives you a string with the format: 'Cumulative: #.##, Department: #.##, Major: #.##'. You want to pick the highest number out of these, and display it proudly on your resume. Since you see yourself doing this every semester, you decide to use the skills you learned in CSE 101 to automate this process with Python. Complete the function choose_highest_gpa, which extracts the three portions of the strings that contain the GPAs, converts them into numbers, and returns the largest of these three values. However, you run into a problem. English is not the robot's first language, so it will misspell words. For example, it might give you the string Coomoolative: #.##, Depertmant: #.##, Mayejohr: #.##'. This is totally understandable, and you are super cool with it, so you decide to write your code by only looking at the numbers and commas. With that in mind, something tells you that the functions split() and int() (or float()) could be really useful. Examples: Function Call Return Value 3.91 choose_highest_gpa ( 'Cumulative: 3.84, Department: 3.91, Major: 3.87') choose_highest_gpa('Coomoolative: 3.90, Depertmant: 3.75, Mayejohr: 3.85') choose_highest_gpa( 'Cumulateeve: 4.00,Deperatmaerafsndfat: 4.00, MAYERasdf: 4.00') 3.9 or 3.90 4.0 or 4.00 [] def choose_highest_gpa (robot_string): pass # delete this line and start writing your code here print(choose_highest_gpa('Cumulative: 3.84, Department: 3.91, Major: 3.87')) print(choose_highest_gpa('Coomoolative: 3.90, Depertmant: 3.75, Mayejohr: 3.85')) print(choose_highest_gpa('Cumulateeve: 4.00, Deperatmaerafsndfat: 4.00, MAYERasdf: 4.00'))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago