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

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 15:10, theamandawhite
Ahouse has the following electrical appliance usage (1) single 40w lamp used for 4 hours per day (2) single 60w fan used for 12 hours per day (3) single 200w refrigerator that runs 24 hours per day with compressor run 12 hours and off 12 hours find the solar power inverter size in watt with correction factor of 1.25.
Answers: 1
image
Engineering, 04.07.2019 18:10, samanthabutryn
Which one from below is not one of the reasons of planning failures? (clo3) a)-planner is careless. b-planner spend less time in the field but more time on the desk c)-planner is not qualified d)-planner does not have sufficient time to properly plan
Answers: 3
image
Engineering, 04.07.2019 18:20, kodyclancy
Aquick transition of the operating speed of a shaft from its critical speed will whirl amplitude. (a) increase (b) limit (c) not affect (d) zero
Answers: 2
image
Engineering, 04.07.2019 19:20, ijohnh14
Apure substance is a)-mixture of various chemical elements or compounds b)-substance that has a fixed chemical composition throughout c)-mixture that is homogeneous (such as air) d)-all the answers
Answers: 3
You know the right answer?
The university defines freshman, sophomore, junior, and senior standing based on the number of units...

Questions in other subjects:

Konu
Mathematics, 03.10.2019 01:30