Engineering
Engineering, 04.04.2020 09:50, ruffnekswife

The university defines freshman, sophomore, junior, and senior standing based on the number of units completed by students. The following function was written to return appropriate class standing for a given student based on the units earned:

def class_standing(units):
if units >= 30:
return "Sophomore"
if units <= 30:
return "Freshman"
if units >=90:
return "Senior"
if units <=90:
return "Junior"

Freshman: [0, 29]

Sophomore: [30 - 59]

Junior: [60 - 89]

Senior: 90+.

Fill-in the blanks based on the above function. Note: Ad edge case is a test case on the edge of a condition, for example, if testing if a value is in the range -100 to 100 inclusive, -100 and 100 would be edge cases, 50 and 500 would be non-edge cases.

Provide a call to the class_standing function to test an edge case for Freshman:



What would the class_standing function return for this case?

Provide a call to the class_standing function to test a non-edge case for Sophomore:



What would the class_standing function return for this case?

Provide a call to the class_standing function to test an edge case for Junior:



What would the class_standing function return for this case?

Provide a call to the class_standing function to test a non-edge case for Senior:



What would the class_standing function return for this case?

2-Define a function total_seconds(time) that takes a string in the format of "hh:mm:ss" or "mm:ss" and returns the total number of seconds in the time. You may assume only valid time strings will be passed to the function.
For example,
total_seconds("01:01:01") returns 3661
total_seconds("10:30") returns 630

answer
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, niicoleassssssf
Aflywheel accelerates for 5 seconds at 2 rad/s2 from a speed of 20 rpm. determine the total number of revolutions of the flywheel during the period of its acceleration. a.5.65 b.8.43 c. 723 d.6.86
Answers: 2
image
Engineering, 04.07.2019 18:10, lerasteidl
Determine whether or not it is possible to compress air adiabatically from k to 140 kpa and 400 k. what is the entropy change during this process?
Answers: 3
image
Engineering, 04.07.2019 18:10, leomessifanboy678
The filament of an incandescent lamp has a temperature of 2000k. calculate the fraction of radiation emitted in the visible light band if the filament is approximated as blackbody
Answers: 2
image
Engineering, 04.07.2019 18:10, colin774
The higher the astm grain size number, the finer the gran is. a)-true b)-false
Answers: 2
Do you know the correct answer?
The university defines freshman, sophomore, junior, and senior standing based on the number of units...

Questions in other subjects:

Konu
Mathematics, 04.02.2021 01:00
Konu
Mathematics, 04.02.2021 01:00
Konu
Arts, 04.02.2021 01:00