learning class and method

August-report
Spencerscooper 1 year ago
parent be435492c5
commit 9b9828229e

@ -0,0 +1,18 @@
class Student:
def __init__ (self,f,m,l):
self.first_name = f
self.middle_name = m
self.last_name = l
def person (self):
self.individual = self.first_name + self.middle_name + self.last_name
return self.individual
Studentsname1 = Student("Spencer"," Cooper "," Galaxy")
Studentsname2 = Student("Thomas", "T", " Boimah")
Studentsname3 = Student("Freena", " Y", " Koikoi")
print("Welcome Student", Studentsname1.person())
print("Welcome Student", Studentsname2.person())
print("Welcome Student", Studentsname3.person())
Loading…
Cancel
Save