subject
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

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 03:10
What precautions should you take to prevent injuries when dealing with heavy loads?
Answers: 1
question
Engineering, 04.07.2019 18:10
Coiled springs ought to be very strong and stiff. si3n4 is a strong, stiff material. would you select this material for a spring? explain.
Answers: 2
question
Engineering, 04.07.2019 18:10
Adouble-strand no. 60 roller chain is used to transmit power between a 13-tooth driving sprocket rotating at 300 rev/min and a 52-tooth driven sprocket. a) what is the allowable horsepower of this drive? b) estimate the center-to-center distance if the chain length is 82 pitches. c) estimate the torque and bending force on the driving shaft by the chain if the actual horsepower transmitted is 30 percent less than the corrected (allowable) power.
Answers: 3
question
Engineering, 04.07.2019 18:10
Compute the pressure drop of 30°c air flowing with a mean velocity of 8 m/s in a circular sheet-metal duct 300 mm in diameter and 15 m long. use a friction factor, f 0.02, and pair = 1.1644 kg/m a. 37.26 pa b. 25.27 pa n c. 29.34 pa d. 30.52 pa
Answers: 1
You know the right answer?
The university defines freshman, sophomore, junior, and senior standing based on the number of units...
Questions
Questions on the website: 13722363