Design Naruto class and MyHeroAcademia class which inherit from Anime class so that the following code provides the expected output. You can not change any of the given code. Do not modify the given...


Design Naruto class and MyHeroAcademia class which inherit from Anime class so that the following code provides the expected output. You can not change any of the given code. Do not modify the given parent class.


Note: add_character() method in both child classes should work for any
number of parameters and assume parameters will be even numbers.


class Anime:
   def __init__(self, name, rating, genre):
     self.name = name
     self.rating = rating
     self.genre = genre


   def add_character(self, *info):
     pass


   def __str__(self):
     s = f"Name: {self.name}\nRating: {self.rating}\nGenre: {self.genre}"
     return s




# Write your codes here.
naruto = Naruto("Naruto", 10, "Adventure Fiction", 2007)
naruto.add_character("Naruto Uzumaki", "Main", "Itachi
Uchiha", "Main", "Madara Uchiha", "Anti
Hero", "Pain", "Supporting", "Shikamaru Nara", "Supporting")
print('1.------------------------------------')
print(naruto.release_year())
print('2.------------------------------------')
print(naruto)
print('3.====================================')
my_hero_academia = MyHeroAcademia("My Hero Academia", 8, "Superhero
Fiction", 5)
my_hero_academia.add_character("Supporting", "Uraraka", "Anti
Hero", "Nomu", "Supporting", "Mirio", "Main", "Midoriya", "Main", "Todoroki")
print('4.------------------------------------')
print(my_hero_academia.season_status())
print('5.------------------------------------')
print(my_hero_academia)


OUTPUT:
1.------------------------------------
Naruto has been released in 2007!!!
2.------------------------------------
Anime Details:
Name: Naruto
Rating: 10
Genre: Adventure Fiction
Release Year: 2007
Characters:
Main: ['Naruto Uzumaki', 'Itachi Uchiha']
Anti Hero: ['Madara Uchiha']
Supporting: ['Pain', 'Shikamaru Nara']
3.====================================
4.------------------------------------
My Hero Academia has premiered 5 seasons!!!
5.------------------------------------
Anime Details:
Name: My Hero Academia
Rating: 8
Genre: Superhero Fiction
Season Premiered: 5
Characters:
Supporting: ['Uraraka', 'Mirio']
Anti Hero: ['Nomu']
Main: ['Midoriya', 'Todoroki']


Question:<br>Design Naruto class and MyHeroAcademia class which inherit from Anime class<br>so that the following code provides the expected output.<br>You can not change any of the given code. Do not modify the given parent<br>class.<br>Note: add_character() method in both child classes should work for any<br>number of parameters and assume parameters will be even numbers.<br>class Anime:<br>def _init_(self, name, rating, genre):<br>self.name = name<br>self.rating = rating<br>self.genre = genre<br>def add_character(self,

Extracted text: Question: Design Naruto class and MyHeroAcademia class which inherit from Anime class so that the following code provides the expected output. You can not change any of the given code. Do not modify the given parent class. Note: add_character() method in both child classes should work for any number of parameters and assume parameters will be even numbers. class Anime: def _init_(self, name, rating, genre): self.name = name self.rating = rating self.genre = genre def add_character(self, "info): pass def_str_(self): s = P'Name: {self.name}inRating: (self.rating}inGenre: {self.genre}" return s # Write your codes here. naruto = Naruto("Naruto", 10, "Adventure Fiction", 2007) naruto.add_character("Naruto Uzumaki", "Main", "Itachi Uchiha", "Main", "Madara Uchiha", "Anti Hero". "Pain". "Supporting", "Shikamaru Nara", "Supporting") print('1. print(naruto.release_year)) print(2.-- print(naruto) print('3.= ====== ==========---=') my_hero_academia - MyHeroAcademia("My Hero Academia", 8, "Superhero Fiction", 5) my_hero_academia.add_character("Supporting", "Uraraka", "Anti Hero". "Nomu", "Supporting", "Mirio". "Main", "Midoriya", "Main", "Todoroki") print(4. print(my_hero_academia.season_status()) print('5. print(my_hero_academia)
OUTPUT:<br>1.<br>Naruto has been released in 2007!!<br>2.<br>Anime Details:<br>Name: Naruto<br>Rating: 10<br>Genre: Adventure Fiction<br>Release Year: 2007<br>Characters:<br>Main: ['Naruto Uzumaki, 'Itachi Uchiha']<br>Anti Hero: ['Madara Uchiha']<br>Supporting: ['Pain', 'Shikamaru Nara']<br>3.<br>4.<br>My Hero Academia has premiered 5 seasons!!<br>5.<br>Anime Details:<br>Name: My Hero Academia<br>Rating: 8<br>Genre: Superhero Fiction<br>Season Premiered: 5<br>Characters:<br>Supporting: ['Uraraka',

Extracted text: OUTPUT: 1. Naruto has been released in 2007!! 2. Anime Details: Name: Naruto Rating: 10 Genre: Adventure Fiction Release Year: 2007 Characters: Main: ['Naruto Uzumaki, 'Itachi Uchiha'] Anti Hero: ['Madara Uchiha'] Supporting: ['Pain', 'Shikamaru Nara'] 3. 4. My Hero Academia has premiered 5 seasons!! 5. Anime Details: Name: My Hero Academia Rating: 8 Genre: Superhero Fiction Season Premiered: 5 Characters: Supporting: ['Uraraka', "Mirio'] Anti Hero: ['Nomu'] Main: ['Midoriya', "Todoroki']
Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here