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 18:10
Water at 70°f and streams enter the mixing chamber at the same mass flow rate, determine the temperature and the quality of the exiting stream. 0 psia is heated in a chamber by mixing it with saturated water vapor at 20 psia. if both streams enters the mixing chamber at the same mass flow rate, determine the temperature and the quality of the existing system.
Answers: 2
question
Engineering, 04.07.2019 18:10
Asingle-geared blanking press has a stroke of 200 mm and a rated capacity of 320 kn. a cam driven ram is assumed to be capable of delivering the full press load at constant force during the last 15 percent of a constant-velocity stroke. the camshaft has an average speed of 90 rev/min and is geared to the flywheel shaft at a 6: 1 ratio. the total work done is to include an allowance of 16 percent for friction a) estimate the maximum energy fluctuation b) find the rim weight for an effective diameter of 1.2 m and a coefficient of speed fluctuation of 0.10
Answers: 1
question
Engineering, 04.07.2019 18:10
Apipe with an outside diameter of 15 cm is exposed to an ambient air and surrounding temperature of -20°c. the pipe has an outer surface temperature of 65°c and an emissivity of 0.85. if the rate of heat loss from the pipe surface is 0.95 kw per meter of length, the external convective heat transfer coefficient (h) is: (a) 12.5 w/m"k (b) 18.6 w/mk (c) 23.7 w/mk (d) 27.9 w/mk (e) 33.5 w/mk
Answers: 1
question
Engineering, 04.07.2019 18:10
Which of the following refers to refers to how well the control system responds to sudden changes in the system. a)-transient regulation b)- distributed regulation c)-constant regulation d)-steady-state regulation
Answers: 1
You know the right answer?
The university defines freshman, sophomore, junior, and senior standing based on the number of units...
Questions
question
Social Studies, 07.04.2021 16:00
question
English, 07.04.2021 16:10
question
Arts, 07.04.2021 16:10
question
Spanish, 07.04.2021 16:10
question
Mathematics, 07.04.2021 16:10
Questions on the website: 13722363