SHARE
TWEET

Untitled

a guest Jun 25th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def __init__(self, name, major, physicsLevel, mathLevel, chemistryLevel, gpa, is_on_probation):
  2.     self.name = name
  3.     self.physicsLevel = physicsLevel
  4.     self.mathLevel = mathLevel
  5.     self.chemistryLevel = chemistryLevel
  6.     self.major = major
  7.     self.gpa = gpa
  8.     self.is_on_probation = is_on_probation
  9.  
  10. def __str__(self):
  11.     return f"{self.name}, {self.major}, {self.gpa}, {self.physicsLevel}"
  12.  
  13. def on_honor_roll(self): # function placed inside a class, in this case whether student is on honor roll through level of gpa
  14.     if self.gpa >= 3.5:
  15.         return True
  16.     else:
  17.         return False
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top