Skip to content

Practical python program for Classes and Objects in python

Notifications You must be signed in to change notification settings

eadewusic/Classes-and-Objects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Classes-and-Objects

Using the skeleton of the class Student, I added some attributes to the Student class which are below;

Name: A string, which was initialized when creating an instance of Student Age: An integer, which was initialized when creating an instance of Student Tracks: A list of strings, which was initialized when creating an instance of Student. Score: A float, which was initialized when creating an instance of Student.

I also created the following methods for class “Student”:

change_name: I changed the student's name, which accepts a new name as an argument. Change_age: I changed the student's age, which accepts a new age as an argument and ensures that age remains an integer. Add_track: I added a new item to student's tracks, which accepts a new track as an argument. get_score: I returned student’s score.

P.S: This is a Python project at Zuri training for the #I4GZuri Scholarship program

Releases

No releases published

Packages

No packages published

Languages