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
In excel office How to create spreadsheets?​
Alenkasestr [34]

Answer:

Step 1: Open MS Excel. Step 2: Go to Menu and select New >> click on the Blank workbook to create a simple worksheet. OR – Just press Ctrl + N: To create a new spreadsheet. Step 3: Go to the spreadsheet work area.

8 0
3 years ago
You have booted your windows workstation into safe mode and enabled boot logging. To which log file is the boot logging informat
enyata [817]

Answer:

Ntbtlog.txt

Explanation:

Found in a book

Have a nice day! :)

5 0
2 years ago
Embracing the time of day you are naturally most energetic
Alborosie
The time of day most energetic is night time feel more alive and use my computer more or any electronics more
4 0
3 years ago
List and explain five instances of issues that pertain to business ethics
castortr0y [4]
Social Media. ...
Harassment and Discrimination. ...
Health and Safety. ...
Technology/Privacy

Disability. ...
Equal Pay. ...
Pregnancy. ...
Race/ Color. ...
Religion. ...
4 0
3 years ago
If a movie starts at 305 and the movie is 2 hrs and 44 mins when does the movie end?
AURORKA [14]
3 : 05 + 2 : 44 = 5 : 49 

.......................................  
4 0
3 years ago
Other questions:
  • why is wrong timing, poor technology, bad implementation and politics in business affected the OSI model as a standard
    5·1 answer
  • What is the difference, if any, between secure HTTP and firewalls?
    13·1 answer
  • A communication medium that carries a large amount of data at a fast speed is called
    6·1 answer
  • What made it possible to develop personal computers?
    10·2 answers
  • Design a class named Employee. The class should keep the following information in member variables:
    5·1 answer
  • Explain two ways by which the calendar meets or fails to meet the criteria of showing the correct data
    7·1 answer
  • Magbigay ng tatlong hanap buhay na makukuha sa mineral produktong galing sa dagat at produktong agrikultural
    10·2 answers
  • To create an SSL connection, a Web server requires a ________, which is an electronic document that confirms the identity of a w
    12·1 answer
  • _____________are where you get down to business and enter data in a worksheet
    12·1 answer
  • How does digital and hybrid computers differ in portability​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!