- 1
python classes
Hey guys, can anyone briefly describe what classes does do?, I am stuck at this place a week. please help.
4 Réponses
+ 5
A Class creates a framework of basic descriptions that you can use to create objects.
For example:
A class of animal will have common features such as colour, sound, breed, eyes, ears, etc....
By assigning attributes to your basic descriptors, you can create different animals without having to rewrite code each time
+ 8
The Python class gives you the ability to declare a data type which itself contains more than one data types, so you can work with them using any function.
+ 5
Attached is a poor example of using a class to create objects which can be used in a program.
https://code.sololearn.com/c8a55LdLpWNB/?ref=app
+ 5
in learn section you can find some information about classes in python:
https://www.sololearn.com/learn/Python/2467/
https://www.sololearn.com/learn/Python/2473/