Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:20, alcantar28eduin
Print "usernum1 is negative." if usernum1 is less than 0. end with newline. convert usernum2 to 0 if usernum2 is greater than 10. otherwise, print "usernum2 is less than or equal to 10.". end with newline
Answers: 3
image
Computers and Technology, 23.06.2019 03:10, nxusasmangaliso8780
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
image
Computers and Technology, 23.06.2019 04:31, Remba
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, Cocco
You have been supporting csm tech publishing's windows server 2016 server network for over a year. the office has two windows server 2016 servers running active directory and a number of other roles. management has informed you that a small sales office is opening in the same building three floors up. the sales manager wants to install a sales application on a server located in the sales office. this server will have limited physical security because there's no special room dedicated for it, which means it will be accessible to non-it personnel and visitors. you're considering installing windows server 2016 server core on the new server because accessing its console regularly probably won't be necessary, and this server will be managed from one of the other csm tech publishing servers. what are the benefits and drawbacks of using server core for this branch office? what are some things you should do to set up this server management environment?
Answers: 1
Do you know the correct answer?
Write a program to define a Superhero class, set attributes and call the methods. Use the following...

Questions in other subjects:

Konu
Biology, 22.02.2021 06:00
Konu
English, 22.02.2021 06:00
Konu
Mathematics, 22.02.2021 06:00