Using python 3 no ifs or loops In the space below, write a function to decide if
ID: 3871865 • Letter: U
Question
Using python 3 no ifs or loops
In the space below, write a function to decide if a student should be accepted into a course, given the following rules:
• Anyone whose program code is CSC should be allowed into the course
• Students whose program code is MAT or STA require a GPA of 3.0 or higher to enter the course • Any student with a GPA above 3.5 is allowed in
• Anyone named Brian should be allowed into the course
You may not use any if statements, loops or any other elements of Python we have not covered in lectur
Explanation / Answer
1. switch("CSC"):
case "CSC" :
allowUsers();
2. switch("MAT" || "STA"):
case "MAT || STA":
requireGPA(3.0):
allowUsers();
3. switch("BRIAN"):
allowUser();
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.