コード例 #1
0
from hs_student import HighSchoolStudent


fred = HighSchoolStudent("fred")
print(fred.get_name_capitalize())
print(fred.get_school_name())
print(fred.get_name())
コード例 #2
0
def student():
    hs = HighSchoolStudent('james')
    return hs.get_school_name()
コード例 #3
0
from hs_student import HighSchoolStudent

james = HighSchoolStudent('james')

print(james.get_name_capitalize())
print(james.get_school_name())
コード例 #4
0
ファイル: main.py プロジェクト: sunilhari9/python
from hs_student import HighSchoolStudent
from student import Student

# Calling StudentClass
surya = Student("surya")
print(surya.get_name_capitalize())
print(surya.get_school_name())

# Calling Inherited class
suneel = HighSchoolStudent("suneel")
print(suneel.get_name_capitalize())
print(suneel.get_school_name())
コード例 #5
0
from student import Student
from hs_student import HighSchoolStudent
from classes import students

print(Student.school_name)
std = Student("sagar")
print(std.get_school_name())
print(std)
print(std.get_name_cap())
print(HighSchoolStudent.school_name)
isha = HighSchoolStudent("Isha")
print(isha.get_school_name())
print(isha)
print(isha.get_name_cap())

print("students list :: ", students)
コード例 #6
0
ファイル: main.py プロジェクト: buildMeABlueBox/Learn_Python
from hs_student import HighSchoolStudent

gurpreet = HighSchoolStudent("Gurpreet")
print(gurpreet.get_school_name())