Skip to content

Instantly share code, notes, and snippets.

@kelvinndmo
Created December 28, 2019 17:47
Show Gist options
  • Save kelvinndmo/87fb682fdac9cc66f1f0ae843a588217 to your computer and use it in GitHub Desktop.
Save kelvinndmo/87fb682fdac9cc66f1f0ae843a588217 to your computer and use it in GitHub Desktop.
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