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: 2

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 06:30
Some peer-to-peer networks have a server and some don't. true false
Answers: 2
question
Computers and Technology, 24.06.2019 08:30
Formatting rows and columns is similar to cell formatting. in an openoffice calc spreadsheet, you can format data entered into rows and columns with the of the rows and columns options. you can insert rows and columns into, or delete rows and columns from, a spreadsheet. use the insert or delete rows and columns option on the insert tab. alternatively, select the row or column where you want new rows or columns to appear, right-click, and select insert only row or only column options. you can hide or show rows and columns in a spreadsheet. use the hide or show option on the format tab. for example, to hide a row, first select the row, then choose the insert tab, then select the row option, and then select hide. alternatively, you can select the row or columns, right-click, and select the hide or show option. you can adjust the height of rows and width of columns. select row and then select the height option on the format tab. similarly, select column, then select the width option on the format tab. alternatively, you can hold the mouse on the row and column divider, and drag the double arrow to the position. you can also use the autofit option on the table tab to resize rows and columns.
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
In which view can you see speaker notes?
Answers: 1
question
Computers and Technology, 24.06.2019 16:50
How many types of string types does python support?
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
Mathematics, 21.06.2019 19:00
Questions on the website: 13722363