PLEASE HELP!!!
I was trying to create a superhero class code, but i ran into this error

File "main.py", line 3
def_init(self, name = "", strengthpts = 0, alterego = "", villain "", powers = "", motto = ""):
IndentationError: expected an indented block

Here is my actual code:
class superhero:

def_init(self, name = "", strengthpts = 0, alterego = "", villain "", powers = "", motto = ""):

# Create a new Superhero with a name and other attributes

self.name = name

self.strengthPts = strengthPts
self.alterego = alterego
self.powers = powers
self.motto = motto
self.villain = villain

def addStrengthPts(self, points):

# Adds points to the superhero's strength.

self.strengthPts = self.strengthPts + points



def addname(self):

if(self.name == "Dr.Cyber"):
print("My hero's name is Dr.cyber!")
elif(self.name == "Mr.cyber"):
print("My hero's name is Mr.cyber!")
elif(self.name == "Cyber Guy"):
print("My hero's name is Cyber Guy!")
else:
print("My hero doesn't have a name")



def addalterego(self):

if(self.alterego == "John Evergreen"):
print("Dr.Cyber's alter ego is John Evergreen")
elif(self.alterego == "John Silversmith"):
print("Dr.Cyber's alter ego is John Silversmith.")
elif(self.alterego == "Johnathen Grey"):
print("Dr.Cyber's alter ego is Johnathen Grey.")
else:
print("Dr.Cyber Does not have an alter ego")



def addpowers(self):

if(self.powers == "flight, super strength, code rewrighting, electronics control, psychic powers"):
print(fly. He is super strong. He can rewrite the genetic code of any object around him to whatever he wants.He can control surrounding electronics to do what he wants. He can move objects with his mind.")
else:
print(Fly. He can rewrite the genetic code of any object around him. he can move objects with his mind.")



def addmotto(self):

if(self.motto == "error terminated!"):
print("rewritting the code!")
else:
print("error eliminated!")



def addvillain(self):

if(self.villain == "The Glitch"):
print("Dr.Cyber's Arch nemisis is The Glitch.")
elif(self.villain == "The Bug"):
print("Dr.Cyber's Arch nemisis is The Bug.")
else:
print("Dr.Cyber has no enemies!")

def main():

newhero = superhero("Dr.Cyber", "John Evergreen", "fly. He is super strong. He can rewrite the genetic code of any object around him to whatever he wants.He can control surrounding electronics to do what he wants. He can move objects with his mind.", "The Glitch", "error terminated!", "0")

print("My Superhero's name is " + newhero.name + ".")

print(newhero.name + "'s alter ego is " + newhero.alterego + ".")

print(newhero.name + " can " + newhero.powers + ".")

print(newhero.name + "'s arch nemisis is " + newhero.villain + ".")

print("when " + newhero.name + " fights " + newhero.villain + ", he lets out his famous motto " + newhero.motto + ".")

print(newhero.name + " defeated " + newhero.villain + ". Hooray!!!")

print(newhero.name + " gains 100 strengthpts.")

main()

PLEASE ONLY SUBMIT THE CORRECT VERSION OF THIS CODE!!! NOTHING ELSE!!!

Answers

Answer 1

Answer:

you need to properly indent it

Explanation:

align your codes

Answer 2

Mark the other guy as brainliest, I'm just showing you what he meant.

I'm not sure if that's all that's wrong with your code, I'm just explaining what he meant.

Answer:

def_init(self, name = "", strengthpts = 0, alterego = "", villain "", powers = "", motto = ""):

# Create a new Superhero with a name and other attributes

self.name = name

self.strengthPts = strengthPts

self.alterego = alterego

self.powers = powers

self.motto = motto

self.villain = villain

def addStrengthPts(self, points):

 

   # Adds points to the superhero's strength.

   self.strengthPts = self.strengthPts + points

def addname(self):

   if(self.name == "Dr.Cyber"):

       print("My hero's name is Dr.cyber!")

   elif(self.name == "Mr.cyber"):

       print("My hero's name is Mr.cyber!")

   elif(self.name == "Cyber Guy"):

       print("My hero's name is Cyber Guy!")

   else:

       print("My hero doesn't have a name")

def addalterego(self):

   if(self.alterego == "John Evergreen"):

       print("Dr.Cyber's alter ego is John Evergreen")

   elif(self.alterego == "John Silversmith"):

       print("Dr.Cyber's alter ego is John Silversmith.")

   elif(self.alterego == "Johnathen Grey"):

       print("Dr.Cyber's alter ego is Johnathen Grey.")

   else:

       print("Dr.Cyber Does not have an alter ego")

def addpowers(self):

   if(self.powers == "flight, super strength, code rewrighting, electronics control, psychic powers"):

       print(fly. He is super strong. He can rewrite the genetic code of any object around him to whatever he wants.He can control surrounding electronics to do what he wants. He can move objects with his mind.")

   else:

       print(Fly. He can rewrite the genetic code of any object around him. he can move objects with his mind.")

def addmotto(self):

   if(self.motto == "error terminated!"):

       print("rewritting the code!")

   else:

       print("error eliminated!")

def addvillain(self):

   if(self.villain == "The Glitch"):

       print("Dr.Cyber's Arch nemisis is The Glitch.")

   elif(self.villain == "The Bug"):

       print("Dr.Cyber's Arch nemisis is The Bug.")

   else:

       print("Dr.Cyber has no enemies!")

def main():

   newhero = superhero("Dr.Cyber", "John Evergreen", "fly. He is super strong. He can rewrite the genetic code of any object around him to whatever he wants. He can control surrounding electronics to do what he wants. He can move objects with his mind.", "The Glitch", "error terminated!", "0")

   

   print("My Superhero's name is " + newhero.name + ".")

   print(newhero.name + "'s alter ego is " + newhero.alterego + ".")

   print(newhero.name + " can " + newhero.powers + ".")

   print(newhero.name + "'s arch nemisis is " + newhero.villain + ".")

   print("when " + newhero.name + " fights " + newhero.villain + ", he lets out his famous motto " + newhero.motto + ".")

   print(newhero.name + " defeated " + newhero.villain + ". Hooray!!!")

   print(newhero.name + " gains 100 strengthpts.")

main()


Related Questions

Implement the function printTwoLargest that inputs an arbitrary number of positive numbers from the user. The input of numbers stops when the first negative or zero value is entered by the user. The function then prints the two largest values entered by the user. If fewer than two distinct positive numbers are entered a message to that effect is printed instead of printing any numbers. Hint: Duplicates will cause problems. Try to make sure that you find a way to ignore them.

Answers

Answer:

The function in Python is as follows:

def printTwoLargest():

   chk = 0

   list1 = []

   num = int(input("Enter: "))

   while num > 0:

       for i in list1:

           if i == num:

               chk+=1

               break;

       if chk == 0:

           list1.append(num)

       chk = 0

       num = int(input("Enter: "))

   list1.sort()

   if len(list1) >= 2:

       print("Largest:", list1[-1])

       print("Second:", list1[-2])

   else:

       print("Length of list must be at least 2")

Explanation:

This defines the function

def printTwoLargest():

This initializes a check variable to 0

   chk = 0

This initializes an empty list

   list1 = []

This prompts the user for input

   num = int(input("Enter: "))

The following loop is repeated until input is 0 or negative

   while num > 0:

The following for loop checks for duplicate

       for i in list1:

           if i == num: If duplicate is found

               chk+=1 The check variable is set to 1

               break; And the for loop is exited

The input is appended to the list if the check variable is 0 (i.e. no duplicate)

       if chk == 0:

           list1.append(num)

This sets the check variable back to 0, for another input

       chk = 0

This prompts the user for another input

       num = int(input("Enter: "))

This sorts the list

   list1.sort()

This prints the two largest if valid user input is 2 or more

   if len(list1) >= 2:

       print("Largest:", list1[-1])

       print("Second:", list1[-2])

if otherwise, this prints that the length must be at least 2

   else:

       print("Length of list must be at least 2")

why do computer architects prefer memory dump to be in base 16​

Answers

Answer:

We use hexadecimal numbers primarily because they provide a more human-friendly representation and it is much easier to express binary number representations in hex than in any other base number system.

Explanation:

What type of information is appropriate for headers and footers? Check all that apply.
media
SmartArt
date and time
charts or graphs
O copyright notice
ООО
slide/page number
company or author's name

Answers

Answer:

Date and time

Copyright Notice

Slide/Page Number

Company or author's name.

Explanation:

Just did it.

Answer:

C. date and time

E. copyright notice

F. slide/page number

G. company or author’s name

Explanation:

hope this helps :)

Es la actividad que posibilita comunicar gráficamente ideas, hechos y valores procesados y sintetizados en términos de forma y comunicación, factores sociales, culturales, económicos, estéticos y tecnológicos

Answers

Answer:

La estadística es una rama de las matemáticas aplicadas que se ocupa de la recopilación, evaluación, análisis y presentación de datos o información. El trabajo también utiliza elementos de cognición, psicología, informática y ciencias de sistemas, cálculos numéricos y contribuciones de otras materias que tratan de matemáticas, datos y métodos informáticos intensivos.

El resultado, también llamado estadística, a menudo se presenta en forma numérica en números absolutos, números de frecuencia, números proporcionales, promedios, en tablas con series de tiempo o con otros números comparativos y a menudo también se ilustra en diagramas o figuras. El resultado se usa en parte para mostrar cómo se maneja algo en este momento y en parte como una herramienta para predecir eventos futuros mediante inducción. La estadística se utiliza en muchas disciplinas científicas, desde las ciencias naturales hasta las humanidades, pero también en la política y los negocios.

i need an quote for a ad im using gatorade

Answers

Answer

Want the best aid for after a game, then try some Gatorade!

Explanation:

Hope this helps lol! plz mark as brainliest!

How many slides would be in a PowerPoint presentation based on the formatting of the Word outline?
A. two
B. Three
C. Eight
D. Eleven

Answers

Answer:

A. two

Explanation:

can i have brainliest please

Answer:

Explanation:

It depends on how the presentation is organized.  If there is one slide for each major section, then the answer is B. Three as there are 3 sections.

But if each outline has its own slide, then there will be D. Eleven slides.

HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP

Answers

Answer:

I should be C! :D

Answer:

B

Explanation:

someone, please answer this.

This lesson showed you the general form of the syntax for a for loop in JavaScript:for

(initialize counter; condition; update counter) {code block;}

What does each part do, and why is it necessary?

Answers

Answer: A loop will continue running until the defined condition returns false . ... You can type js for , js while or js do while to get more info on any of these. ... initialization - Run before the first execution on the loop. ... But it can be used to decrement a counter too. statement - Code to be repeated in the loop.

Explanation:

Using the drop-down menus, correctly complete the sentences.
A(n)
vis a set of step-by-step instructions that tell a computer exactly what to do.
The first step in creating a computer program is defining a(n)
the next step is creating a(n)
v problem that can be solved by a computer program.
A person writing a computer program is called a(n)

Answers

Answer:

It is  computer program , Problem, Logic, Programmer

Explanation:

on edge

**NEED THE ANSWER ASAP** Which print option should be selected to minimize the number of pages required to print the content of my presentation?

A. Handouts
B. Note Pages
C. Slides
D. Outline

Answers

Either a note page or some handouts
Brainiest?

Which of the statements below describe how to print a document?

Click on the Print icon at the tip of the screen.

Click on Print in the system tray.

Select Print from the Start menu.

Select Print from the File menu.


(On the picture above is what I have plz let me know if I’m wrong)

Answers

I pretty sure it’s the first one also I don’t think that you pick two answers because it does not say to do so

Explain benefits and disadvantages of using BNC over F-Type connectors on coaxial cables

Answers

Answer:

The benefits and disadvantages of using BNC over F-Type connectors on coaxial cables are;

The benefits of the BNC includes;

1) Easy connect and disconnect for a more rapid connection unlike the F-Type connector which is a screw connector

2) Reduction on stress on the termination of the coaxial cable

3) Appropriate in systems that see frequent reconfiguration unlike te F-Type connector that is permanently attached

4) Prevent unwanted disconnection ensuring image consistency by locking into place

5) Can extend to 300 ft.

The disadvantages of the BNC connectors are;

1) A separate power supply for the cable is required

2) Is used only for video transmission

3) Cannot be used for audio

4) The center wire is not easily visible like those of the F-Type connector which serves as a pin

5) The BNC connector is not watertight like the F-Type connectors

6) There are no provision for properly and securely attaching the cable to the camera for field work such that it can be easily disconnected while in use unlike the F-Type connectors

7) It is not as easy to manufacture like the F-Type connector and it is more expensive

8) The installation of the BNC connector on a coaxial cable is more intricate and the center cable is hidden from view after the BNC is attached thereby making it not possible to see if there is an error in installation which is unlike the F-type connector that takes less than 30 seconds to be attached to a cable

9) The F-Type connector provides more cost savings during installation than the BNC connector

Explanation:

The BNC connector is a type of bayonet connector used more frequently on CCTV systems. The benefits of the BNC includes;

The F-Type connectors are usable on SATV, CATV, and Digital TV where they are used together with RG6 or RG11 cables

Put the steps in order to produce the output shown below. Assume the indenting will be correct in the program.
JDoe
1. Line 1
answer = username ('Joann', 'Doe')
2. Line 2
print (answer)
3. Line 3
def username (strFirst, strLast):
4. Line 4
return strFirst[O] + strLast

Answers

Answer:

The correct code is:

def username (strFirst, strLast):

      return strFirst[O] + strLast

answer = username ('Joann', 'Doe')

print (answer)

Explanation:

The given code illustrates the use of functions.

i.e passing values to a function and retrieving values from it

So, first: We start with the def statement

def username (strFirst, strLast): ----> This defines the function

Then the return statement

      return strFirst[O] + strLast --- > This passes value to the main

Next, is the main function of the program which is:

answer = username ('Joann', 'Doe') ---> This passes values to the username function

print (answer) ---> This prints the returned value from the function

Who clarified the binary system of algebra​

Answers

Answer:

Really good mine Bella

Explanation:

Yes it is it’s c with a L

Other Questions
Read the following quotation: "Price controls and minimum wage laws can help protect workers while allowing the market to function." How do these controls contribute to a democratic society? (3 points) They force corporations to care about their customers. They make the corporations less focused on profits. They protect the rights of individuals to earn income. They give certain individuals more power than others. The greatest delivery of oxygen from the blood to the surrounding tissues occurs at 37C. Colder blood temperature results in greater dissociation of oxygen and hemoglobin. Hemoglobin has a lower affinity for oxygen under high temperature conditions. Increasing blood pH results in more oxygen unloading in tissues. The structure of proteins is related to their function. true or false Help PLEASE MUCH APPRECIATED!!! No websites please K + Br2 KBrIdentify a covalently bonded molecule in the reaction above that is aREACTANT. Suppose you work as a clerk at a local retail store earning $6 per hour. The amountof your weekly paycheck (before taxes are taken out) could be written F(x) = 6x.16. What is the independent variable in this function and what does it represent?17. What does the dependent variable represent? Your program will be used by many departments at the university. Your comments will be important to their IT people. What would be a useful comment?This was a really hard part to write, but it finally works.Im not sure what this does, but I dont have time to troubleshoot it.This segment returns a value that is used by the segment marked B. What was the purpose of Nikita Khrushchevs De-Stalinization program in the U.S.S.R.?Select one:a.to present the idea of a capitalist Soviet Union to the Soviet peopleb.to suppress efforts by the followers of Stalin to take over after his deathc.to convince other countries that Stalin's form of communism was a good oned.to correct the negative image that Stalin's extreme policies had given communism This is measure of angle b anong halamang ornamental ang may malambot at di makahoy na tangkay?rosedaisymorning glorygumamela can someone help by fixing my grammar in this thx! i'll give brainlist im lonely Something I don't usually say out loud, I try to hide it from everyone I see, even when I try to distract it is still there, no matter what I say or do its still there, I try hiding away So I dont show it, I push it down in me but its like a balloon so it always comes up, the littlest thing can make it burst,everything I try to do won't make it go away, I try laughing to make it go away, but I alway do feel it stay, the thing is im trying to say is,I'm lonely,sad,and feeling hurt, the world is making it worse for me.We all have struggles and I fill last, I let people depend on me when, I need to depend on them,I dont show my emotions out to the world,I feel like the world is against me everyday, I hate the way I feel when im in my bed, alone in my thoughts, nothing to help me other than myself, everyone asleep in the quiet night, I feel like nobody cares about me,I need a break but I can't take one,I let everyone take their own,I'll do what they need before I take mine....So I am alone more like lonely, This is me in the world and I wouldn't change it... but I still am lonely and I still want to change that The sound from an insect is produced when it vibrates its wings at an average rate of 500 vibrations per second:(a) What is the time-period of the vibrations ?(b) What is the frequency of the vibrations in hertz ?(c) Can we hear this sound? Why or why not? Who is the speaker in a poem?1. the character who talks out loud2. the character who conveys the ideas3. the person who actually wrote the poem4. the person the poem is about 12. What separated Grand turismo from other racing games was its focus on ______.a) Your audiences and females in particularb) Fantasy graphics and visualsc) Pure simulation and ultrarealistic featuresd) All of the above Alan read the following information on the NASA website while researching for a report on Mars.NASAs senior Mars rover, Opportunity, is examining rocks at the edge of Endeavour Crater for signs that they may have been either transported by a flood or eroded in place by wind.Those scenarios are among the possible explanations rover-team scientists are considering for features seen just outside the crater rims crest above Perseverance Valley, which is carved into the inner slope of the rim.The team plans to drive Opportunity down Perseverance Valley after completing a walkabout survey of the area above it. The rovers drives now use steering motors on only the rear wheels, following a temporary jam of the left-front wheels steering actuator this month. Opportunity has not used its right-front wheels steering actuator since 2005, the year after it landed on Mars.The mission has been investigating sites on and near the western rim of Endeavour Crater since 2011. The crater is about 14 miles (22 kilometers) across.Source:https://www.nasa.gov/feature/jpl/mars-rover-opportunity-on-walkabout-near-rimWhich of the following is the best way for Alan to accurately paraphrase this information?Select one:NASAs Mars rover, Opportunity, is exploring different sites to help scientists on Earth learn more about Mars.According to NASA,perseverance Valley is part of the inner slope of the western rim of Endeavour Crater, which is on Mars."Opportunity is exploring Endeavour Crater and Perseverance Valley, using its rear wheels only." The height of the Eiffel Tower in Paris is 980 feet. If the scale of the cake to the actual tower will be 1 in: 15ft, how tall should Julie make the cake? Show your work and explain your reasoning. Will mark brainliest to the correct answer if 1 pound of chacolate creams at Philadelphia candies cost $7.52 how much does that cand cost by the ounce. 5. What Egyptian dam allows year round irrigation of farmlandin the Nile Valley? There are ten shirts in your closet, four blue and six green. You randomly select one to wear on Monday and then a different one on Tuesday. You wear a blue shirt on Monday and a green shirt on Tuesday How did Missouris application as a slave state in 1819 challenge us law