MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-Python-Course / Employee

Class Employee

Chapter 10/03_self.py:1–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Employee:
2 language = "Python" # This is a class attribute
3 salary = 1200000
4
5 def getInfo(self):
6 print(f"The language is {self.language}. The salary is {self.salary}")
7
8 @staticmethod
9 def greet():
10 print("Good morning")
11
12
13harry = Employee()

Callers 1

03_self.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected