Files
it_school/Python_module_1/python_016.py
Ionel Andrei Cataon ad4a4cf8f6 Refacere repo
2026-02-12 14:14:46 +02:00

14 lines
346 B
Python

#!/home/andrei/it_school/bin/python3
class Student:
def __init__(self, nume, varsta, nota):
self.nume = nume
self.varsta = varsta
self.nota = nota
def display_info(self):
print(f"Nume: {self.nume}, Varsta: {self.varsta}, Nota: {self.nota}")
student1 = Student("Andrei", 20, 9.5)
student1.display_info()