Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I do not know how to code Stadium part. Stadium (1.75 pts): Constructor () o Stadium Name o Pokemon A o Pokemon B

I do not know how to code Stadium part.

Stadium (1.75 pts):
• Constructor ()
o Stadium Name
o Pokemon A
o Pokemon B
• Battle Method:
o Follows the following sequence of events:
o Both Pokemon Speak to each other
o Next, the Pokemon attack each other until one of the Pokemon's health points is
0
o At each iteration, the health points and attacks of each Pokemon should display
to the user running the program

Below is what I did now.

class Pokemon:
def __init__(self, name, level=1, health=100, pokemon_type="Normal" ):
self.name = name
self.level = level
self.health = health
self.type = pokemon_type
def attack(self, attackee):
print(self.name, "Attacks",attackee.name )
attackee.health = attackee.health - 10
def speak(self):
print("Pokemon sound")

def __str__(self):
return "Pokemon: {}".format(self.name)

class Pikachu(Pokemon):
def __init__(self):
Pokemon.__init__(self, Pikachu, level=1, health=100, pokemon_type="Electic")

def attack(self, attackee):
attackee.health -= 10
print("\n",self.name,"Attacks",attackee.name,"Using Thrunderbolt")

def speak(self):
print("Pika Pika...Pikachu")

class Bulbasaur(Pokemon):
def __init__(self):
Pokemon.__init__(self, Bulbasaur, level=1, health=100, pokemon_type="Using Grass")

def attack(self, attackee):
attackee.health -=20
print("\n",self.name,"Attacks",attackee.name,"Razor Leaf")
def speak(self):
print("Bulba Bulba...Bulbasaur")

 

 

class Stadium():
def __init__(self, name, pokemon_a, pokemon_b):

pass

def battle(self):

pass

Step by Step Solution

There are 3 Steps involved in it

Step: 1

To implement the Stadium class and its methods you ca... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microeconomics An Intuitive Approach with Calculus

Authors: Thomas Nechyba

1st edition

538453257, 978-0538453257

More Books

Students also viewed these Programming questions

Question

Discuss the various types of policies ?

Answered: 1 week ago

Question

Briefly explain the various types of leadership ?

Answered: 1 week ago

Question

Explain the need for and importance of co-ordination?

Answered: 1 week ago

Question

Explain the contribution of Peter F. Drucker to Management .

Answered: 1 week ago