subject

Write a program to define a Superhero class, set attributes and call the methods. Use the following guidelines to write your program: Look over the code that starts the Superhero class. You may use this code as a starting point. Come up with two additional attributes and one method to add to the class. Be creative! Some attributes could be a motto, villain, strength, weakness, or alter ego. An action might be saveWorld() or transformHero().
class Superhero:

# Superhero class represents the facts related to a superhero.

def __init__(self, name = "", strengthPts = 0):

# Create a new Superhero with a name and other attributes.

self. name = name
self. strengthPts = strengthPts

def addStrengthPts(self, points):

# Adds points to the superhero's strength.

self. strengthPts = self. strengthPts + points

Update the class by including at least two new attributes and one new method.
In the main() method, create your superhero. Be sure to assign values to its attributes and call its methods.
Create output that describes your superhero in a story fashion or a series of events.
Write the pseudocode for this program. Be sure to include any needed input, calculations, and output.
Please help me write a input and the output for this code using python idle.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:20
Write a method replacekey in the minheap class with the following signature: public void replacekey(integer oldkey, integer newkey) the method will replace the first occurrence of oldkey with the newkey, and restore the min-heap property after the change. if the oldkey does not exist in the heap, the method prints an appropriate message and returns without changing the heap. example: suppose our binary heap object (bh) has the following keys: *** 4 6 7 32 19 64 26 99 42 54 28 then the method call: bh.replacekey (oldkey integer(54), newkey integer(2))
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Consider jasper’s balance sheet. which shows how to calculate jasper’s net worth?
Answers: 1
You know the right answer?
Write a program to define a Superhero class, set attributes and call the methods. Use the following...
Questions
question
Biology, 15.12.2020 22:30
question
Mathematics, 15.12.2020 22:30
question
Mathematics, 15.12.2020 22:30
question
Mathematics, 15.12.2020 22:30
Questions on the website: 13722362