- قم بانشاء ملف main.py
- قم بانشاء class باسم Person لديه:
Attributes:
- name
- age
- قم بانشاء نسخة (object) من الكلاس باسم first_person
- قم بطباعة اسم وعمر الـ first_person
- قم بانشاء method باسم is_adult داخل كلاس Person تقوم بالتالي:
- اذا كان العمر اكثر من 18 قم بطباعة:
You have too much responsibilities
- اذا كان العمر اقل من 18 قم بطباعة:
Lucky you
- قم باستخدام الـ is_adult للـ first_person
- قم بتغيير الـ Person class ليحتوي على constructor
- اضف الـ name and age arguments على الـ first_person
- قم بانشاء string method تقوم بطباعة الاتي:
My name is John and I am 22 years old