Created
December 28, 2019 17:47
-
-
Save kelvinndmo/87fb682fdac9cc66f1f0ae843a588217 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
class Student: | |
""" A Student class """ | |
def __init__(self, first, last, marks): | |
self.first = first | |
self.last = last | |
self.marks = marks | |
@property | |
def email(self): | |
return "{}.{}@gmail.com".format(self.first, self.last) | |
@property | |
def fullname(self): | |
return "{} {}".format(self.first, self.last) | |
def send_parent_message(self, parent_name): | |
message = f"Dear {parent_name}, Your son {self.first} {self.last} managed to score {self.marks}" | |
return message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment