The function below takes one non-negative numeric parameter: (credit_hours_earned) containing the number of credit hours that a student earned. Complete the function to return a string indicating the student's classification as indicated by the table below. For example, for 36 credit hours, your function should return 'Sophomore standing'. (python)
| Freshman standing | = 0–29.9 hours |
|---|---|
| Sophomore standing | = 30–59.9 hours |
| Junior standing | = 60–89.9 hours |
| Senior standing | = 90 or more hours |
Function:
def determine_standing(credit_hours_earned):
Screenshot of the code:

Sample Output:

Code to copy:
#Define the function determine_standing() having a
#non-negative value as number of credit hours earned.
def determine_standing(credit_hours_earned):
#Declare and initialize required variable.
message = ""
#If the credit hours earned is between 0 and 29.9,
#then the message will be freshman standing.
if(credit_hours_earned >= 0 and
credit_hours_earned <= 29.9):
message = "Freshman standing"
#If the credit hours earned is between 30 and 59.9,
#then the message will be sophomore standing.
elif(credit_hours_earned >= 30 and
credit_hours_earned <= 59.9):
message = "Sophomore standing"
#If the credit hours earned is between 60 and
#89.9, then the message will be junior standing.
elif(credit_hours_earned >= 60 and
credit_hours_earned <= 89.9):
message = "Junior standing"
#Otherwise, the message will be senior standing.
else:
message = "Senior standing"
#Return the required message value.
return message
#Display the result of the function call
#determine_standing() by passing the argument value
#as 36.
print(determine_standing(36))
The function below takes one non-negative numeric parameter: (credit_hours_earned) containing the number of credit hours that...
In the function below, return the string 'negative' if the numeric parameter number is in fact negative, or, return the string 'positive' if the parameter number is positive, otherwise return string 'zero' use function "def string_indicating_positivityOrNegativity(number):" python 3
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:...
The function below takes a single parameter, a list of numbers called number_list. Complete the function to return a string of the provided numbers as a series of comma separate values (CSV). For example, if the function was provided the argument [22, 33, 44], the function should return '22,33,44'. Hint: in order to use the join function you need to first convert the numbers into strings, which you can do by looping over the number list to create a new...
Write a Student class that stores information for a Montclair student. The class should include the following instance variables id, an integer identifier for the student lastName, a string for the student's last name creditsEarned, an integer representing the number of course-credits the student has earned courseLoadCredits, an integer representing the current number of credits in progress. status, an integer representing the status of the student (1 means freshman, 2 means sophomore, 3 means junior, 4 means senior). This status...
please help
Write a simple program with Student class having STL list of Record's structure as a member. 1. Records of the Students are not accessible to the outside world. 2. Student shall output its standing (Freshman, Sophomore etc). 3. A Student can only be created with the name 4. A class can only be added if there is a class name and the passing grade. Driver program creates a Student, adds few classes to the Student's records, then prints...
Write a python function score_formatter() that takes one parameter, which is a formatted string that contains information about the score received by a student in a particular subject. The function analyzes the string and returns a reformatted string for the score. You will need to use the function re.sub that is discussed in the lecture notes. If the string does not match the pattern, the function returns the string "error". The input string is always given in the format specified...
#We've written the function, sort_with_bubbles, below. It takes #in one list parameter, lst. However, there are two problems in #our current code: # - There's a missing line # - There's a semantic error (the code does not raise an # error message, but it does not perform correctly) # #Find and fix these problems! Note that you should only need #to change or add code where explicitly indicated. # #Hint: If you're stuck, use an example input list and...
Last picture is the tester program!
In this Assignment, you will create a Student class and a Faculty class, and assign them as subclasses of the superclass UHPerson. The details of these classes are in the UML diagram below: UHPerson - name : String - id : int + setName(String) : void + getName(): String + setID(int) : void + getID(): int + toString(): String Faculty Student - facultyList : ArrayList<Faculty - rank: String -office Hours : String - studentList...
For Python 3.7+.
TEST THE CODE WITH THE FOLLOWING GLOBAL CODE AFTER
YOU'RE DONE:
print('\nStart of A2 Student class demo ')
s1 = Student('David Miller', major = 'Hist',enrolled = 'y',
credits = 0, qpoints = 0)
s2 = Student('Sonia Fillmore', major = 'Math',enrolled = 'y',
credits = 90, qpoints = 315)
s3 = Student('A. Einstein', major = 'Phys',enrolled = 'y', credits
= 0, qpoints =
0)
s4 = Student('W. A. Mozart', major = 'Mus',enrolled = 'n', credits
= 29, qpoints...