Question: Your task is to create a new file called cut_off.py and write a function cut_off taking in two numeric parameters pa_score and final_score. This function
Your task is to create a new file called cut_off.py and write a function cut_off taking in two numeric parameters pa_score and final_score. This function will return the boolean value True or False to determine whether a student is failed. The condition is defined below. Implement your function in the file cut_off.py and make sure the function name is cut_off.
-
return True to indicate that a student has either pa_score or final_score below 55 (not include 55)
-
return False otherwise
grade_prediction.py
def grade_prediction(pa_score, final_score, total_grade)
Write a function grade_prediction in file grade_prediction.py to predict one's letter grade for CSE 8A given their PA, final score, and total_grade. Your function will take in three numeric parameters (in this order), and return a string as the prediction. Use the conditions given below.
-
return "no prediction" if total_grade is negative regardless of what value pa_score and final_score are
-
return "F" if the student is failing in either PA or final regardless of what they get for total_grade.(" failing in either PA or final " means either pa_score or final_score is below 55, you need to call cut_off() you write.)
-
return "F" if the student is not failing in either PA or final and total_grade is between 0 (inclusive) and 60 (exclusive)
-
return "D" if the student is not failing in either PA or final and total_grade is between 60 (inclusive) and 70 (exclusive)
-
return "C" if the student is not failing in either PA or final and total_grade is between 70 (inclusive) and 80 (exclusive)
-
return "B" if the student is not failing in either PA or final and total_grade is between 80 (inclusive) and 90 (exclusive)
-
return "A" if the student is not failing in either PA or final and total_grade is between 90 (inclusive) and 96 (exclusive)
-
return "A+" if the student is not failing in either PA or final and total_grade is greater than or equal to 96
mystery.py
def mystery(number)
Your task is to create a new file called mystery.py and write a function mystery in file mystery.py to make a connection between a number and some mysterious strings. Your function will take in a numeric parameter and return a string. Use the conditions given below.
-
return "CSE" if number divisible by 2
-
return "8A" if number divisible by 3
-
return "Angelic" if number divisible by 5
-
return "Angelina" if number divisible by 2 and 3
-
return "Jazzy" if number divisible by 3 and 5
-
return "Jaslina" if number divisible by 2 and 5
-
return "Hooway! CSE8A gang!" if number divisible by 2, 3 and 5
-
return "" otherwise
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
