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
Artemon [7]
3 years ago
6

Write a class Example() such that it has a method that gives the difference between the size of strings when the '-' (subtractio

n) symbol is used between the two objects of the class. Additionally, implement a method that returns True if object 1 is greater than object 2 and False otherwise when the (>) (greater than) symbol is used. For example: obj1 = Example('this is a string') obj2 = Example('this is another one') print(obj1 > obj2) False print(obj1-obj2) 3
Computers and Technology
1 answer:
Mariulka [41]3 years ago
3 0

Answer:

class Example:

def __init__(self, val):

self.val = val

def __gt__(self, other):

return self.val > other.val

def __sub__(self,other):

return abs(len(self.val) - len(other.val))

def main():

obj1 = Example('this is a string')

obj2 = Example('this is another one')

print(obj1 > obj2)

print(obj1 - obj2)

main()

\color{red}\underline{Output:}

You might be interested in
One form of online vandalism is ____ operations, which interfere with or disrupt systems to protest the operations, policies, or
Sindrei [870]

Answer:

A) hacktivist

Explanation:

According to my research on cyber security attacks, I can say that based on the information provided within the question the form on online vandalism being defined is called hacktivist operations. These are activists who hack into government or organizational systems in order to protest their policies or actions, and by doing so can severely damage their systems.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

8 0
3 years ago
Read 2 more answers
How does Accenture help companies harness the power of data to achieve optimal business outcomes?
EleoNora [17]

Accenture help companies harness the power of data to achieve optimal business outcomes as they develop data governance frameworks that go on to form the basis of the company's data analytics strategy.

<h3>What is Accenture known for?</h3>

Accenture is known to be a body that is known for its different range of service that they do offer as well as their  practice areas. These is made up of: strategy, management, digital, technology, and also that of operations consulting.

Accenture is known to be one that tends to helps a lot of firms to be able to make full use of the power of data to be able to get the proper market benefits from the data and they also allow the firms to learn and describe the "art of the possible" via the use of their data and analysis.

Therefore, Accenture help companies harness the power of data to achieve optimal business outcomes as they develop data governance frameworks that go on to form the basis of the company's data analytics strategy.

Learn more about Accenture  from

brainly.com/question/25682883

#SPJ1

See full question below

How does Accenture help companies harness the power of data to achieve optimal business outcomes?

- They help companies think about and define the "art of the possible" with their data assets.

- They develop data governance frameworks that go on to form the basis of the company's data analytics strategy.

- They utilize only their Data and Analytics Platform to enable companies.

- They provide an interactive front end for a database solution that changes the data culture.

5 0
2 years ago
What command do you type in the search box to access the command line intrface in windows?
Whitepunk [10]
Cmd.exe



------------------------------------------
3 0
3 years ago
What should you use as the argument for the goto() command?
Soloha48 [4]
D. The X and Y coordinates of a point 

goto(21,60)

will make the turtle go to that specific location.
7 0
3 years ago
Question 12
AlladinOne [14]

Which is a multicast address ?

ans: 241.2.2.1

6 0
2 years ago
Other questions:
  • Which keyboard feature is a form feed character?
    14·1 answer
  • If you purchase a software suite for personal use, you can install the software how many times on how many different machines?
    6·1 answer
  • How is a network printer identified on the network?
    8·1 answer
  • Whereas lines of competition are clearly defined in the more established industries, in the Internet industry they are blurred a
    9·1 answer
  • If a simple pipelined processor is super-pipelined by a factor of 3 (the ALU takes 3 cycles instead of one for the smallest oper
    15·1 answer
  • MS Excel is a powerful spreadsheet program that helps people with complex mathematical calculations. In what ways could you use
    10·1 answer
  • knowledge contributes vitally to the development of __________ memory, or recollections of personally experienced events that oc
    12·1 answer
  • You need to update both the DEPARTMENT_ID and LOCATION_ID columns in the EMPLOYEES table using one UPDATE statement. Which claus
    5·1 answer
  • Beyond adding equations, what else does the Insert Equation feature allow users to do?
    7·1 answer
  • To find detailed information about the origin of an email message, look at the ________________.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!