Question

def class_standing(units): if units >= 30: return "Sophomore" if units <= 30: return "Freshmen" if units...

def class_standing(units):

if units >= 30:

return "Sophomore"

if units <= 30:

return "Freshmen"

if units >= 90:

return "Senior"

if units <= 90:

return "Junior"

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?                                     

0 0
Add a comment Improve this question Transcribed image text
Answer #1
a call to the class_standing function to test an edge case for Freshman is
class_standing(29)

the class_standing function return for this case is
Freshman

a call to the class_standing function to test a non-edge case for Sophomore is
class_standing(30)

the class_standing function return for this case is
Sophomore

There is no way to call to the class_standing function to test an edge case for Junior and Senior, because for all values greater than or equals to 30 gives "Freshman" and for all other values it returns "Sophomore"
Add a comment
Know the answer?
Add Answer to:
def class_standing(units): if units >= 30: return "Sophomore" if units <= 30: return "Freshmen" if units...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • According to the record of the registrar’s office at a state university, 35% of the students...

    According to the record of the registrar’s office at a state university, 35% of the students are freshman, 25% are sophomore, 16% are junior and the rest are senior. Among the freshmen, sophomores, juniors and seniors, the portion of students who live in the dormitory are, respectively, 80%, 60%, 30% and 20% Referring to the information above, what is the probability that a randomly selected student is a sophomore who does not live in a dormitory?

  • A professor compared differences in class grades between students in their freshman, sophomore, junior, and senior...

    A professor compared differences in class grades between students in their freshman, sophomore, junior, and senior years of college. If different participants were in each group, then what type of statistical design is appropriate for this study? a two-independent-sample t test a one-way between-subjects ANOVA a two-way between-subjects ANOVA both A and B

  • please peovide coding in R: with a data of 13 variables and 200 observations Using the...

    please peovide coding in R: with a data of 13 variables and 200 observations Using the variable CLASS, test at 5% significance level to test the claim that the proportions of Freshmen, Sophomores, Juniors, and Seniors are the same. 2. Repeat part (a) for the variable COLLEGE. RLM ENGLISH MATH COMP 21 16 25 839SSESSOR 8 F 17 F N H ABCD 1 SEX HSP GPA AGE CREDITS CLASS COLLEGE MAJOR RESIDENCY TYPE 2 Transfer Blochm Resident F 75 2.39...

  • def get_average_club_count(person_to_clubs: Dict[str, List[str]]) -> float: """Return the average number of clubs that a person in...

    def get_average_club_count(person_to_clubs: Dict[str, List[str]]) -> float: """Return the average number of clubs that a person in person_to_clubs belongs to. >>> get_average_club_count(P2C) 1.6 >>> get_average_club_count({'Bob': ['X', 'Y'], 'John': []}) 1.0 """ This is the function I need to test for edge cases, I need to have a test case such that it will detect that the input has been modified(mutation). What test case would I implement?

  • can someone help with this? need to use c++. The aim of this homework assignment is...

    can someone help with this? need to use c++. The aim of this homework assignment is to practice writing classes. This homework assignment will help build towards project I, which will be to write a program implementing Management of Rosters System. For this assignment, write a class called Student. This class should contain information of a single student. This information includes: last name, first name, standing, credits gpa, date of birth, matriculation date. For now you can store date of...

  • In PYTHON ONLY PLEASE You will use a dictionary in Python You only have string in Python so you have to use a string dat...

    In PYTHON ONLY PLEASE You will use a dictionary in Python You only have string in Python so you have to use a string data type Use a Switch statement.A switch statement is just another way of writing an IF statement. The user will enter f, s, j, or r from the keyboard for freshman, sophomore, junior, or senior. Use character data type for c++. Then you can say something like: char level ='f'; level=toupper(level); You would need a loop...

  • High School Class Sophomore Junior Senior Freshman 1 2 4 0 3 2 5 3 4...

    High School Class Sophomore Junior Senior Freshman 1 2 4 0 3 2 5 3 4 60 5 0 3 4 0 0 2 4 4 5 1. List the mean and standard deviation for each of the 4 Class groups. 2. Describe the ANOVA results: What did For equal? Was it significant? 3. What was the eta-squared effect size? Would this be considered a small, moderate, or large effect according to Cohen's conventions? (You will need to calculate this...

  • Please provide the code for the last part(client side program). yes i have all the class...

    Please provide the code for the last part(client side program). yes i have all the class implementations. ``` person.h #ifndef PERSON_H #define PERSON_H #include <string> using namespace std; class person { public: person(); string getname() const; string getadd() const; string getemail() const; string getphno() const; string toString() const; private: string name; string add; string email; string phno; }; ```person.cpp #include "person.h" person::person() { name = "XYZ"; add="IIT "; email="%%%%"; phno="!!!!!"; } string person::getname() const { return name; } string person::getadd()...

  • In python 3, 1. Write a program that takes a number of credit hours and returns...

    In python 3, 1. Write a program that takes a number of credit hours and returns a classification as follows: 29 credits or less: freshman; 30-59 credits: sophomore; 60-89 credits: junior; 90+ credits: senior. 2. Use a loop to valid input such that users can only enter positive numbers. 3. Use a loop to allow the user to keep entering credit hours and receiving classifications until they quit. All code must be in a function. I suggest the following structure:...

  • Look at the following function definition: def my_function(x, y): return x[y] a. Write a statement that...

    Look at the following function definition: def my_function(x, y): return x[y] a. Write a statement that calls this function and uses keyword arguments to pass ‘testing’ into x and 2 into y. b. What will be printed when the function call executes? 6. Write a statement that generates a random number in the range I'm using python to solve this this is what i did def main():      result= my_function(x='testing', y=2)      print(result) def my_function(x,y):      return x[y] main()

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT