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
padilas [110]
4 years ago
15

What will be the output of the following Python code? class A: def test1(self): print(" test of A called ") class B(A): def test

(self): print(" test of B called ") class C(A): def test(self): print(" test of C called ") class D(B,C): def test2(self): print(" test of D called ") obj=D() obj.test()
Computers and Technology
1 answer:
Vlad [161]4 years ago
7 0

Answer:

"test of B called"

Explanation:

  • The object is created for the D class, but there are two test methods in class B and C.
  • The D class does not hold any test method. So when the object called the test method. Then the B method is called.
  • It is because the B class is declared first in the inheritance of D class like in the statement "class D(B, C)".
  • If the statement will be "class D(C, B)", then the C method will be called.
  • if the D class holds the method test, then only the D method will be called.
  • Hence the output is "test of B called".
You might be interested in
Create a new method in your language called Times Print. This should be a void method. It should accept exactly two numeric valu
user100 [1]

Answer:

The code commented is given below, also the lines that start with # are comments that explains the code.

# Create a function named times_print that receives 2 values x and y

def times_print(x, y):

   # Print the formatted string

   print("The value of {} times {} is {}".format(x,y,x*y))

# Create the main function

def main():

   # Call the funciton times_print 3 times with different values

   times_print(2,3)

   times_print(4,5)

   times_print(5,6)

# Execute the main function

main()

Explanation:

The code was written using Python 3.5, and here I attach the screenshots of the program running:

8 0
4 years ago
_______medium is a secondary storage medium that uses magnetic techniques to store and retrieve data on disks or tapes coated wi
KiRa [710]

Answer:

The answer is Magnetic

Explanation:

Magnetic medium is a secondary storage medium that uses magnetic techniques to store and retrieve data on disks or tapes coated with magnetically sensitive materials.

Magnetic based drives, for example:- Hard disk. Floppy Disk. Magnetic tape.

Optical based drives, for example:- CD drive (ROM and RW) DVD drive (RPM and RW)

Flash or solid state chip based drives, for example:- USB drive. SD cards.

7 0
3 years ago
You can use a(n) ____ to visually separate related controls from other controls on the form.
maksim [4K]

Answer:

The correct answer to the following question will be Group Box.

Explanation:

Group Box:

  • A type container that contains many types of controls that are usually related to each other in the form.
  • It usually provides the identified grouping for other controls.
  • used for the subdivision of the forms.
  • Separation of the controls can be done with the help of grouping by group box.

5 0
3 years ago
To remove an embedded chart, you should _____ it and press the DELETE key. (Points : 2) move drag hide click
Readme [11.4K]
I think the answer would be "click" 
3 0
3 years ago
What is an example of constructive criticism for an employee who is shy during meetings?
rewona [7]
<span>Speak up more so people don't think you're rude</span>
8 0
4 years ago
Read 2 more answers
Other questions:
  • Why is investing in a mutual fund less risky than investing in a particular company's stock? A. Mutual funds only invest in blue
    14·2 answers
  • QUESTION
    14·1 answer
  • Answer ASAP and I'll give brainliest.
    10·2 answers
  • Which of the following is false? A. The last element of an array has position number one less than the array size. B. The positi
    9·1 answer
  • You use the ____ button if you want to specify subtotals or other calculations within the wizard.
    12·1 answer
  • When two well-informed people have different perspectives on a problem, it is often because they are focusing on a different app
    12·1 answer
  • Create a program that displays a menu to select addition, subtraction, or multiplication. Using random numbers between 0 and 12
    7·1 answer
  • Mention three types of pipeline hazards​
    6·2 answers
  • If you wish to install a new OS without disturbing the old one so that you can boot to either OS, what type of boot setup should
    6·1 answer
  • Describe the role of a distributed file system in a job execution environment such as MapReduce in a large-scale cloud system. g
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!