Challenge: Admin
Swipe to start coding
You have a User class from the last challenge.
The methods are corrected (User -> {self.username} in strings).
Let's define the Admin class!
- Define the 
Adminclass inherited from theUserclass. - Define the 
create_content()admin's method that prints the string:
f"{self.username} creates the content". - Define the 
update_content()admin's method that prints the string:
f"{self.username} updates the content". - Define the 
delete_content()admin's method that prints the string:
f"{self.username} deletes the content". 
Note
Adminhas all the capabilities ofUserthat do not need to be reimplemented. This is an example of how inheritance makes our life easier.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 2.78
Challenge: Admin
Свайпніть щоб показати меню
Swipe to start coding
You have a User class from the last challenge.
The methods are corrected (User -> {self.username} in strings).
Let's define the Admin class!
- Define the 
Adminclass inherited from theUserclass. - Define the 
create_content()admin's method that prints the string:
f"{self.username} creates the content". - Define the 
update_content()admin's method that prints the string:
f"{self.username} updates the content". - Define the 
delete_content()admin's method that prints the string:
f"{self.username} deletes the content". 
Note
Adminhas all the capabilities ofUserthat do not need to be reimplemented. This is an example of how inheritance makes our life easier.
Рішення
Дякуємо за ваш відгук!
single