People
Person
Person
A class to represent a person.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
first name of the person |
surname |
str
|
family name of the person |
age |
int
|
age of the person |
Methods:
| Name | Description |
|---|---|
info |
Prints the person's name and age. |
__init__(name, surname, age)
Constructs all the necessary attributes for the person object.
A person object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name |
str
|
first name of the person |
required |
surname |
str
|
family name of the person |
required |
age |
int
|
age of the person |
required |
info(additional='')
Prints the person's name and age.
If the argument additional is passed, then it is appended after the main info.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
additional |
str
|
More info to be displayed (optional, default is None) |
''
|