1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Andrei [34K]
3 years ago
14

Define a new class Fighter that inherits from Spaceship. Add a variable property weapon that defaults to an empty string and a v

ariable property remainingFirePower that defaults to 5.
Computers and Technology
1 answer:
Ksenya-84 [330]3 years ago
4 0

Answer:

class Fighter(Spaceship):

   weapon = ""

   remain_fire_power = 5

Explanation:

The class "Fighter" is a python class that inherits all the variables and methods from the Spaceship class. The Fighter class is considered the child class while the Spaceship class is known as the parent class. The weapon and remain_fire_power variables are class variables unique to the fighter class and defaulted to an empty string and 5 respectively.

You might be interested in
Word can only print documents on one size of paper.<br><br> True or false
Elena L [17]

Answer:

False

Explanation:

You can always go in the document settings to change the layout and make the paper wider (landscape).

Layout > Orientation

Choose portrait or landscape

5 0
2 years ago
The process of changing a program’s internal structure without changing the way the program works is ______________.
aev [14]

Explanation: changing the coding and not the way it works.

7 0
3 years ago
Try making a character (string) variable and a logical variable . Try creating a variable with a "missing" value NA. You can cal
quester [9]

Answer:

The solution code is written in R script.

  1. #string variable
  2. character_str<- "Hello World"
  3. #logical variable
  4. logic <-  a > b
  5. #Missing value
  6. myVec <-c(1, 2, 3, NA)
  7. #Use class to check data type
  8. class(character_str)
  9. class(logic)
  10. class(myVec)

Explanation:

A string variable is a variable that hold a string (the letters enclosed within quotation marks) (Line 2)

A logical variable is a variable that hold a logical value (either True or False). The logical value is created by comparing two variables (Line 5).

In R, missing value is an unknown value which is represented by NA symbol (Line 8).  

We can use in-built method <em>class </em> to check for the variable type in R (Line 11-13). For example, the output of <em>class(character_str)</em> is "<em>character</em>"

8 0
3 years ago
When creating envelopes, how will you adjust the layout?
Burka [1]
It D because I hade this too so it is D
4 0
3 years ago
Read 2 more answers
Explain how can you protect your computer from malware
rosijanka [135]
Trend micro security for your Mac or pc or trend micro mobil security for your android or iOS Mobil device?

Hope this helps!
6 0
3 years ago
Read 2 more answers
Other questions:
  • Two students are discussing the flow of electricity. Student A says that voltage is a measure of the amount of electron flow in
    8·1 answer
  • Why would a brokered CD pay more than a regular CD?
    13·1 answer
  • Una bombilla de 40 w de potencia está encendida durante 10 horas. Calcular la energía que ha consumido en julios y en kw·h.
    12·1 answer
  • 18) choose which article title would most likely be described by the database subject headings victims of famine, ireland, histo
    14·1 answer
  • Select one or more of the following: Which of these events will cause signal(s) to be generated by the kernel (the operating sys
    6·1 answer
  • What is first page of website called​
    10·1 answer
  • Multiple Choice: We have been assigned the task of developing a software testing tool (tester) that can assess reachability of s
    11·1 answer
  • There are many best practices for digital recordings. Select the three best practices from the list below. select the best micro
    14·1 answer
  • Explain Http and Ftp​
    12·1 answer
  • You need to install Windows on a new computer. You also need to replace a motherboard in another computer, and both tasks need t
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!