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]
3 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]3 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
Outline a scenario in which you might be acting ethically but might still want to remain anonymous while using the Internet. How
kompoz [17]

Answer:

I would like to stay anonymous while criticizing the current government. As there have been many cases when people who wrote against the government's decisions were caught by the police.

So I would prefer to stay anonymous while commenting on various government policies. My friends would know about it because I share my posts only with them.

The government can know about my identity by ordering the social networking site to reveal it.

8 0
3 years ago
What is green computing in non-technical term?​
DochEvi [55]

Answer:

Green computing is also known as green information technology (green IT)

4 0
3 years ago
I think i have a virus on my computer what am i supposed to do
patriot [66]

Answer:

call like a phone or computer company and ask wjat thry can do

4 0
3 years ago
Which of these methods can you use to insert a new row in a worksheet?
vodka [1.7K]

Answer:

I think It should be B

Explanation:

If wrong so please sorry

3 0
3 years ago
True or false, cloud storage does not require internet access?
Dmitry_Shevchenko [17]
False, the storage is being accessed from the cloud which can only be accessed through an internet connection.
3 0
3 years ago
Other questions:
  • You can pin applications to which two areas?
    11·1 answer
  • The Windows Group Policy feature provides __________ that govern the way Windows operates in enterprise environments. a. a centr
    8·1 answer
  • 1. Why is it important to compare features of a computer before making a purchase?
    13·2 answers
  • As part of his proofreading process, and to catch any spelling or grammar mistakes, John uses this feature in Word Online to hav
    7·1 answer
  • In addition to the four primary computer operations, today's computers almost always perform ____ functions.
    7·1 answer
  • Anna’s computer will not power on. What aspect of the computer should Anna check (hardware or software)? How can Anna work to re
    5·1 answer
  • A page with no meaningful content that is full of ads and the webmaster makes money from if someone clicks on them is called____
    7·1 answer
  • A picture of kitchen sink draining system​
    15·2 answers
  • A school has an intranet for the staff and students to use. Some of the files stored on the intranet are confidential. Give two
    15·1 answer
  • How do you mark the brainiest?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!