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
What is 4365 −3412 when these values represent
Inessa [10]

The result of the subtraction of 4365 and 3412 using octal numbers is of:

753.

<h3>What are octal numbers?</h3>

For octal numbers, each number is represented by three bits, as follows:

  • 0 = 000.
  • 1 = 001.
  • 2 = 010.
  • 3 = 011.
  • 4 = 100.
  • 5 = 101.
  • 6 = 110.
  • 7 = 111.

Then the binary representation of number 4365 is given as follows:

100011110101

The binary representation of number 3412 is given as follows:

011100001010

Then the following binary subtraction is made:

100011110101 - 011100001010

The result of this subtraction is of:

100011110101 - 011100001010 = 111101011

Then the octal result is given as follows:

111 101 011 = 753.

More can be learned about binary numbers at brainly.com/question/8649831

#SPJ1

4 0
10 months ago
A merge is _____.
Aliun [14]
The process of combining information from a variety of sources
7 0
3 years ago
Read 2 more answers
Write a method that prints on the screen a message stating whether 2 circles touch each other, do not touch each other or inters
beks73 [17]

Answer:

The method is as follows:

public static void checkIntersection(double x1, double y1, double r1, double x2, double y2, double r2){

    double d = Math.sqrt(Math.pow((x1 - x2),2) + Math.pow((y1 - y2),2));

    if(d == r1 + r2){

        System.out.print("The circles touch each other");     }

    else if(d > r1 + r2){

        System.out.print("The circles do not touch each other");     }

    else{

        System.out.print("The circles intersect");     }

}

Explanation:

This defines the method

public static void checkIntersection(double x1, double y1, double r1, double x2, double y2, double r2){

This calculate the distance

    double d = Math.sqrt(Math.pow((x1 - x2),2) + Math.pow((y1 - y2),2));

If the distance equals the sum of both radii, then the circles touch one another

<em>     if(d == r1 + r2){</em>

<em>         System.out.print("The circles touch each other");     }</em>

If the distance is greater than the sum of both radii, then the circles do not touch one another

<em>    else if(d > r1 + r2){</em>

<em>         System.out.print("The circles do not touch each other");     }</em>

If the distance is less than the sum of both radii, then the circles intersect

<em>    else{</em>

<em>         System.out.print("The circles intersect");     }</em>

}

6 0
2 years ago
Decribe the components of an Microsoft<br>Windows desktop<br>​
damaskus [11]

Explanation:

the main component of Windows when you start your computer are the desktop, my computer, recycle bin , start button, Taskbar and shortcuts to application after opening an application you will also have a Windows with an active application which will appear in your desktop and taskbar.

3 0
3 years ago
. The BEST description of a proprietary database is one that
AVprozaik [17]
Is free to the public
8 0
3 years ago
Other questions:
  • Samantha was calculating a mathematical formula on an electronic spreadsheet. She used multiple values to recalculate the formul
    12·2 answers
  • How do you uninstall a program using the Control Panel?
    10·1 answer
  • Forms often allow a user to enter an integer. Write a program that takes in a string representing an integer as input, and outpu
    9·1 answer
  • Which best explains what a credit score represents
    10·2 answers
  • Which of the following lines of code is syntactically correct?
    14·1 answer
  • Tornado Alley is located in the middle of the United States, extending from Texas up through the Dakotas. The above statement is
    6·1 answer
  • Who is your favorite smite god in Hi-Rez’s “Smite”
    14·1 answer
  • JPG is considered a lossy file format. What does this mean?
    15·2 answers
  • Describe the job of an Architect.
    5·2 answers
  • _____ refers to the programs that a device can run.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!