Write a class Example() such that it has a method that gives the difference between the size of strings when the '-' (subtraction) 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

Answers

Answer 1

Answer:

Here the code is given as follows,

Explanation:

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()

Output:-

Write A Class Example() Such That It Has A Method That Gives The Difference Between The Size Of Strings

Related Questions

(viii) Word does not allow you to customize margins.
true/false:-​

Answers

In Word, each page automatically has a one-inch margin. You can customize or choose predefined margin settings, set margins for facing pages, allow extra margin space to allow for document binding, and change how margins are measured.

I would say false

cho dãy số a[] có n phần tử và dãy số b[]cõ m phần tử là các các số nguyên dương nhỏ hơn 1000 . Gọi tập hợp A là tập các số khác nhau trong a[], tập hợp B là các số khác nhau trong b[]

Answers

Answer:

please translate

Thank you✌️

Write a program to print all odd numbers between 20 and 50(Qbasic)​

Answers


Source Code:

total = 0

FOR x = 20 TO 50 STEP 2
total = total + x
NEXT x

PRINT "Total=";total

Which option is used in order to configure switchboards for a complex database?
Switchboard Manager
Global Options
Quick Search
Database Formatter
worth 100 points

Answers

Answer:

switch board manager

Explanation:

Draw AND, OR, XOR and XNOR gates with truth table and logic gates.

.​

Answers

Answer:

see picture. let me know if you have questions.

Book information (overriding member functions) Given main() and a base Book class, define a derived class called Encyclopedia. Within the derived Encyclopedia class, define a PrintInfo() function that overrides the Book class' PrintInfo() function by printing not only the title, author, publisher, and publication date, but also the edition and number of volumes. Ex. If the input is: The Hobbit J. R. R. Tolkien George Allen & Unwin 21 September 1937 The Illustrated Encyclopedia of the Universe James W. Guthrie Watson-Guptill 2001 2nd 1 the output is: Book Information: Book Title: The Hobbit Author: J. R. R. Tolkien Publisher: George Allen & Unwin Publication Date: 21 September 1937 Book Information: Book Title: The Illustrated Encyclopedia of the Universe the output is: Book Information: Book Title: The Hobbit Author: J. R. R. Tolkien Publisher: George Allen & Unwin Publication Date: 21 September 1937 Book Information: Book Title: The Illustrated Encyclopedia of the Universe Author: James W. Guthrie Publisher: Watson-Guptill Publication Date: 2001 Edition: 2nd Number of Volumes: 1 Note: Indentations use 3 spaces. LAB ACTIVITY 11.14.1: LAB: Book information (overriding member functions) File is marked as read only Current file: main.cpp cin >> numVolumes; main.cpp Book.h 25 26 27 28 29 30 31 32 33 34 35 36 myBook. SetTitle(title); myBook. SetAuthor(author); myBook. SetPublisher(publisher); myBook.SetPublicationDate(publicationDate); myBook.PrintInfo(); Book.cpp Encyclopedia.h myEncyclopedia. SetTitle(eTitle); myEncyclopedia. SetAuthor(eAuthor); myEncyclopedia. SetPublisher(ePublisher); myEncyclopedia. SetPublicationDate(ePublicationDate); Encyclopedia.cpp

Answers

Answer:

hansnmakqkai8aiaiakqklqlqlqlqlqqqw

Explain how communication has helped to the staff in organization to reach their maximum delivery of service with efficience and effectiveness ​

Answers

Answer:

i don't know

Explanation:

How can the system administrator give the executive assistant the ability to view, edit, and transfer ownership of all records, but not allow her to delete the records

Answers

i don’t think that’s possible. giving control to edit records also means giving control to delete them. maybe discuss before hand to build trust and understanding or duplicate the records in case she does delete them

Write a program get_price.py with a function get_price() that takes a dictionary of fruits as an argument and returns the name of the most expensive fruit. Each item of the dictionary includes: A key: the name of the fruit A value: the price of the fruit.

Answers

Answer:

The program is as follows:

def get_price(fruits):

   AllPrice = fruits.values()

   value_iterator = iter(AllPrice)

   mostExpensive = next(value_iterator)  

   for item in fruits:

       if fruits[item]>=mostExpensive:

           mostExpensive = fruits[item]

           fruitName = item

   print(fruitName)

fruits = {}

n = int(input("Number of Fruits: "))

for i in range(n):

   name = input("Fruit name: ")

   price = int(input("Fruit price: "))

   fruits[name] = price

get_price(fruits)

Explanation:

This defines the get_price function

def get_price(fruits):

This gets all price in the dictionary fruit

   AllPrice = fruits.values()

This passes the values to a value iterator

   value_iterator = iter(AllPrice)

This initializes mostExpensive to the first price in the dictionary

   mostExpensive = next(value_iterator)

This iterates through the elements of the dictionary  

   for item in fruits:

If current element is greater than or equals most expensive

       if fruits[item]>=mostExpensive:

Set most expensive to the current element

           mostExpensive = fruits[item]

Get the corresponding fruit name

           fruitName = item

Print fruit name

   print(fruitName)

The main begins here

This initializes the fruit dictionary

fruits = {}

This gets input for the number of fruits

n = int(input("Number of Fruits: "))

This is repeated for every inputs

for i in range(n):

Get fruit name

   name = input("Fruit name: ")

Get fruit price

   price = int(input("Fruit price: "))

Append name and price to dictionary

   fruits[name] = price

Call the get_price function

get_price(fruits)

Which statement is most likely to be true about a computer network?

A network can have several client computers and only one server.

A network has to have physical cables connecting the devices in the network.

A network can have several servers and only one client.

A network can consist of a single computer with no other devices in communication with that computer.

Answers

Which statement is most likely to be true about a computer network?

A network can have several client computers and only one server.

Explanation:

a network can have several client computers and only one server

How do i connect WiFi on windows xp without icon?

Answers

Right click anywhere on your taskbar, and then click Properties. Step 2: Find and click the Notification Area tab on the top bar, and then find the section labeled with System icons, check the checkbox for Network. Last, click OK to finish it.

Answer:

Right click anywhere on your taskbar, and then click Properties. Step 2: Find and click the Notification Area tab on the top bar, and then find the section labeled with System icons, check the checkbox for Network. Last, click OK to finish it.

The development of the modern computer system has been evolutionary. Discuss this phenomenon and further discuss how current trends in computing would impact future computer systems development.

Answers

Explanation:

With the great advances in computer systems today it is possible that we can connect and interact with people who are on the other side of the planet, we can study virtually without having to attend a university or school in person, we can even work from our own homes without having to travel to our workplace, which allows us to reduce transportation costs and time.

The above benefits have been possible thanks to the evolution of computer systems.But just as the evolution of computer systems brings great benefits, it also carries great risks for the future, in recent years there has been a considerable increase in cyber attacks, therefore it is necessary an advanced cybersecurity system that allows to quickly control and protect from external threats to organizations; As well as it is necessary to emphasize training in computer systems for people of all educational levels so that they are prepared and can give proper use to computer systems and thus also learn to protect themselves from cyber fraud.

Write down the short history of COMPUTER? ​

Answers

Answer:

Charles Babbage, an English mechanical engineer and polymath, originated the concept of a programmable computer. Considered the "father of the computer",he conceptualized and invented the first mechanical computer in the early 19th century.

7. Which control is used to display multiple records in List Form
a) Data Grid View b) Textbox c) Label d) Button

Answers

Answer:

I think a is correct answer.

Answer:

A

Explanation:

Genevieve is a student who attends classes at a campus downtown. She likes to study in the college's coffee shop, where she often accesses the Internet through the college's wireless network. Which network type is Genevieve using

Answers

Answer:

I'll let you make an educated guess off of this info! You always retain info better making an inference on a subject that you are having trouble with!

Explanation:

There are four types of wireless networks -- wireless local area networks, wireless metropolitan area networks, wireless personal area networks and wireless wide area networks -- each with its own function.

wireless local area network

A wireless local area network (WLAN) is a wireless distribution method for two or more devices. WLANs use high-frequency radio waves and often include an access point to the Internet. A WLAN allows users to move around the coverage area, often a home or small office, while maintaining a network connection.

wireless metropolitan area network

A metropolitan area network (MAN) is a computer network that connects computers within a metropolitan area, which could be a single large city, multiple cities and towns, or any given large area with multiple buildings. A MAN is larger than a local area network (LAN) but smaller than a wide area network (WAN).

wireless personal area network

A PAN provides data transmission among devices such as computers, smartphones, tablets and personal digital assistants. PANs can be used for communication among the personal devices themselves, or for connecting to a higher level network and the Internet where one master device takes up the role as gateway.

wireless wide area network

Wireless wide area network (WWAN), is a form of wireless network. ... WWAN connectivity allows a user with a laptop and a WWAN card to surf the web, check email, or connect to a virtual private network (VPN) from anywhere within the regional boundaries of cellular service.

I hope this helped!!

shania

The network type Genevieve uses is a wireless local area network.

What is a wireless local area network?

A wireless local area network (WLAN) exists as a wireless distribution procedure for two or more devices. WLANs utilize high-frequency radio waves and often contain an access issue to the Internet. A WLAN permits users to move around the coverage area, often a house or small office, while preserving a network connection.

Therefore, the correct answer is option (a) LAN.

Complete questions:

Genevieve is a student who attends classes at a campus downtown. She likes to study in the college's coffee shop, where she often accesses the Internet through the college's wireless network. Which network type is Genevieve using

(a) LAN

(b) MAN

(c) PAN

(d) WAN

To learn more about wireless local area networks refer to:

https://brainly.com/question/8985345

#SPJ2

Select all steps in the list below that should be completed when using the problem-solving process discussed in this chapter.


Take action.

Take a break.

Evaluate.

Complete the task.

Consider solutions and list ideas.

Understand the task or need.

Ask a coworker for help.

Answers

Take action.

Evaluate.

Complete the task.

Consider solutions and list ideas.

Understand the task or need.

Shawn's supervisor has tasked him with determining how the company can increase the security of its Wi-Fi. Shawn plans to present several options to his supervisor and ask her to check his work. Which of the following is not a strong security method? (Select TWO.)
a. Disabling SSID
b. WPS
c. MAC filtering
d. Setting encryption

Answers

Answer:

The not strong security methods are:

a. Disabling SSID

b. WPS

Explanation:

When you disable SSID, you only make your Wi-Fi secure for the less determined attackers.  By disabling the SSID (network name), those who are less technically inclined are prevented from connecting to the network but, this will not deter a more determined and technically savvy adversary.  The best two options are MAC filtering and setting encryption.  WPS (Wi-Fi Protected Setup) enables the process of connecting to a secure wireless network from a computer or other device easier instead of making it harder.

Suppose a program written in language L1 must be executed on a machine running a program running in language L0. What important operation must take place

Answers

Question Completion with Options:

a. Translation of the entire L1 program into L0 code

b. Translation of the L0 program into L1 code

c. Creation of a language L3 that interprets L0 instructions

d. Interpretation of each L1 statement using L0 code as the L1 program is running.

Answer:

The important operations that must take place in this scenario are:

a. Translation of the entire L1 program into L0 code

d. Interpretation of each L1 statement using L0 code as the L1 program is running.

Explanation:

Translation enables decoding to take place.  This means that the L1 program is decoded into a language that the L0 program can understand and execute.  Without this translation, the higher level language of L1 will not be understood by the machine language of the L0 programs.  Translation of a code creates a shared understanding, thereby easing program execution.  Code translation is simultaneously accompanied by interpretation.

what is a computer memory

Answers

Answer:

it is your answer

Explanation:

it is the storage space where data is kept.

CONDUCT INTERVIEWS

Using your interview questions, interview at least three business professionals. Here are some useful tips for conducting the interviews:

Schedule an appointment for the interview for a time and place that is quiet and convenient.
Be on time and be prepared with paper and pen. You may also bring a recording device.
Be friendly and courteous; remember that the interviewee is giving you her valuable time!
Ask your questions clearly.
Don't interrupt!
Try to stay focused, but if something interesting comes up, go with it.
Take good notes. Ask the interviewee to repeat what she said if necessary, but only do this when it is something important.
Obtain all the information needed before ending the interview. If necessary, review your notes with the person.
Thank the interviewee for her time.
Write a description of the interviews in this text box.

Answers

Note that conducting a professional interview with business professionals is quite tasking and it does require skills and boldness,

Note that the questions that one need to ask are questions that are based on  the field of those business professionals, the company, your background, their dreams and aspirations and as such one should not be personal about it.

What are the  interview questions asked?

The interview questions prepared were:

Do they have the skills, expertise, and experience to carry out the job?.Are they happy and interested in current job and the current firm they are working with?.Can I fit into their team, organization culture, and firm?. etc.

Learn more about interview from

https://brainly.com/question/8846894

Explain how mobile phone production could be more sustainable​

Answers

Answer:

Sustainable design - the key features for sustainable phones are: use of sustainable and recycled materials, the use of less energy and efficient charging, durability, and last but not least they should be easy and inexpensive to repair.

Answer:

One of the best ways to change this is to voice your concern to cell phone manufacturers for more sustainable products. Request smartphones that are made with fewer hazardous chemicals, manufactured in plants powered by renewable energy, and that contain recycled materials.

Explanation:


Which of the following is not a data visualization technique?

Answers

Answer:

Normalization

Explanation:

From the options given :

Boxplot is a data visualization techniqye used for representing numerical data in the form of a box such that it adequately conveys the five number summary if the dataset which are the minimum, maximum, lower quartile, median and upper quartile, it also depicts the presence of outlines.

Scatter plot are used depict the relationship between two variables on the x and y axis of a graph. Each point is a representation of the (x, y) value pairs of the observation.

Tag clouds are usually used to represent word, metatdata and other free form text using different colors and font sizes to give information about the data.

Normalization is the odd option out as it is used to restructure data in other to promote integrity of data.

help me please help me please​

Answers

Answer:

3 one is the answer or 4 one

Answer:

none of the above

Explanation:

Every flip flop will divide the frequency by 2, so you need 2 flip flops.

If i took my SIM card out of my phone and put it in a router then connect the router and my phone with Ethernet cable would the ping change???

Answers

Answer:

ummmmmmmmmmmmm nooooo???

disadvantage of monolithic programming​

Answers

Answer:

=Tight coupling between components, as everything is in one application.

=Less reusability.

=Large code base; tough for developers and QA to understand the code and business knowledge.

=Less Scalable.

=Does not follow SRP (Single Responsibility Principle)

=More deployment and restart times.

To nest one structure within another structure, you a. define both structures and then create a data member of the nested structure type within the other structure b. create a container that holds objects of the nested structure type and then include the container within another structure c. define the nested structure within another structure

Answers

Answer:

Hence the correct option is option a) define both structures and then create a data member of the nested structure type within the other structure.

Explanation:

To make Address nested to Employee, we've to define Address structure before and out of doors Employee structure and make an object of Address structure inside Employee structure.

For example, we may need to store the address of an entity employee in a structure.

What is software? Why is it needed?​

Answers

Explanation:

Software is a data and information collection of computer.

It needs to protect computer from viruses.

I hope this helps you

Peter is a new business owner. Because Peter is on a strict budget, he uses an older Novell NetWare server. The NetWare server still relies on the legacy IPX/SPX network protocol suite. Peter needs to connect his server to the Internet. He decides to use a gateway instead of a router. What is the likely motive behind Peter's decision

Answers

The most likely motive of Peter's decision to use a gateway for connecting his serve to the internet is to get a wireless connection for the internet.

A gateway server is used to communicate to the internet service provider. It is used to receives the data. It helps to sends the data to the router in order to translate as well as distribute the wireless devices.

In the context, Peter who is on a strict budget uses gateway system to connect to the internet and he uses the older version of Novell NetWare server.

Learn More :

https://brainly.in/question/35731153

Write and application that reads five integers from the user and determines and prints the largest and the smallest integers. Use only the programming techniques your learned in this chapter (use only if statements) 1.2. Modify your first program to add 2 more functions, the first function should determines the largest number and the second smallest. Both new functions must get invoked from the main function.

Answers

Answer:

#include <stdio.h>  

#include <limits.h>  

 

/* Define the number of times you are going  

  to ask the user for input. This allows you  

  to customize the program later and avoids the  

  hard coding of values in your code */  

#define NUMVALS 5  

 

int main(void)  

{  

   int i = 0;  

   int curval = 0;  

   /* Set your initial max as low as possible */  

   int maxval = INT_MIN;  

   /* Set your initial min as high as possible */  

   int minval = INT_MAX;  

 

   /* Loop through and ask the user for the defined  

      number of values */  

   for (i = 0; i < NUMVALS; i++)  

   {  

       /* Ask the user for the next value */  

       printf("Enter the next value: ");  

 

       /* Get the next value from the user */  

       scanf("%d", &curval);  

 

       /* Check to see if this is our biggest or  

          smallest value yet */  

       if (curval > maxval)maxval = curval;  

       if (curval < minval)minval = curval;  

   }  

 

   /* Output the results */  

   printf("The smallest value entered was: %d \n", minval);  

   printf("The largest value entered was: %d \n", maxval);  

 

   /* End the program */  

   return 0;  

}

Explanation:

what is 1 st genaration of computer ​

Answers

Explanation:

The period of first generation computer was from 1946-1959 AD .The computers of first generation used vacuum tubes as the basic components for memory and circuitry for CPU ( Central Processing Unit).These tubes, like electric bulbs, produced a lot of heat and were prone to frequent fusing of the installation.

Hope it helps...............

Other Questions
Which equation expresses the solubility product of Zn3(PO4)2? a. Ksp = [Zn2+][PO43] b. Ksp = [Zn2+]3 [PO43]2 c. Ksp = 6[Zn2+][PO43]2 d. Ksp = 108[Zn2+][PO43]2 A 200-lb man carries a 10-lb can of paint up a helical staircase that encircles a silo with radius 30 ft. If the silo is 60 ft high and the man makes exactly two complete revolutions, how much work is done by the man against gravity in climbing to the top What are this elements chemical and physical properties? Explain how the chemical properties affect the physical properties of an element. Select the correct answer from each drop-down menu. Study the graphs, and then complete the passage. An anomaly in global temperature is a deviation from what is normal or expected. The graph shows that global atmospheric co2 ___(increased exponentially. Remained constant. Increased slightly)in the twenty-first century, and global temperature also increased during the same time. Based on the timeline, these statistics suggest a correlation between climate change and ___(wind energy production. Use of electric cars. Industrial carbon emissions). If the current trend of increasing co2 levels continues, the greenhouse effect will continue to ___(warm the planet. Release gas into space. Destroy carbon dioxide) . 11 Emilio makes metal fences.He is making a fence using this design.1.44 mDO NOT WRITE IN THIS AREA1.8 m.The fence will need3 horizontal metal pieces of length 1.8m2 tall metal pieces of length 1.44 m5 medium metal pieces6 short metal pieces as shown on the diagram.The heights of the tall, medium and short metal pieces are in the ratio 9:8:7.How many metres of metal in total does Emilio need to make the fence? identify the type of function graphed to the right.linearexponentialother What do the chi-square test for independence, the Pearson correlation, and simple linear regressions all have in common write and essay that analyzes one work of literature that you have read from the perspective of a quotation. In your essay, interpret the quotation and explain whether it applies to a work of literature you have read. Support your opinion using literary terms and elements as well as details from the text lens quotation : character is what you are in the dark- dwight lyman moody plz put da answer in da comments so i wont get plagiarism! A wire was shaped to form a square of area81cm. An equilateral triangle was formed bythe same wire. What is the length of a side ofthe triangle formed? The object of the [Fourteenth Almendment wasundoubtedly to enforce the absolute equality of the tworaces before the law, but, in the nature of things, it couldnot have been intended to abolish distinctions based uponcolor, or to enforce social, as distinguished from political,equality, or a commingling of the two races upon termsunsatisfactory to either. Laws permitting, and evenrequiring, their separation, in places where they are liableto be brought into contact, do not necessarily imply theinferiority of either race to the other, and have beengenerally, if not universally, recognized as within thecompetency of the state legislatures in the exercise oftheir police power.- Justice Brown, Majority Opinion, Plessy v. Ferguson,1896What was the response of southern lawmakers to the ruling?O A. The revision of the equal protection clause in the FourteenthAmendmentB. The investigation of discriminatory business practicesC. The enactment of more segregation lawsD. The denunciation of the one-drop rule in racial differentiationNo Doesnt have to be 5 paragraphs please help. 6. Find the value of x to the nearest tenth. a Given: CDE, DK CE ,CD=DE Area of CDE = 29cm2 mCDE=31 Find: DK Ending one's own life is morally permissible because people are rightfully in charge of their own lives. And this is so because people have the freedom to determine their own destiny. And this follows from the fact that people have the moral right to decide whether they live or die. And this is true because ending one's own life is morally permissible. Group of answer choices No fallacy. Slippery slope. Equivocation. False cause. Begging the question. What does the poet describe in the second stanza? The amount of people at the bay The number of daffodils The popular new dance move The types of stars in the sky Mountain men were __________.A) Native AmericansB) politiciansC) trappers Ashika is worried about about her exam.( seem) Depreciation on equipment for the year is $5,640. Journalize the transaction if the company prepares adjustments once a year.(a) Record the journal entry if the company prepares adjustments once a year.*(b) Record the journal entry if the company prepares adjustments on a monthly basis.**Refer to the Chart of Accounts for exact wording of account titles.Chart of AccountsCHART OF ACCOUNTSGeneral Ledger ASSETS11 Cash12 Accounts Receivable13 Supplies14 Prepaid Insurance16 Equipment17 Accumulated Depreciation-Equipment LIABILITIES21 Accounts Payable22 Notes Payable23 Unearned Fees24 Wages Payable25 Interest Payable EQUITY31 Common Stock32 Retained Earnings33 Dividends REVENUE41 Fees Earned EXPENSES51 Advertising Expense52 Insurance Expense53 Interest Expense54 Wages Expense55 Supplies Expense56 Utilities Expense57 Depreciation Expense59 Miscellaneous ExpenseGeneral Journal(a) Record the journal entry on December 31, if the company prepares adjustments once a year.*(b) Record the journal entry on December 31, if the company prepares adjustments on a monthly basis.**Refer to the Chart of Accounts for exact wording of account titles.PAGE 1JOURNAL DATE DESCRIPTION POST. REF. DEBIT CREDIT1 2 3 4 If you and a friend are standing side-by-side watching a soccer game, would you both view the motion from the same reference frame?a. Yes, we would both view the motion from the same reference point because both of us are at rest in Earths frame of reference.b. Yes, we would both view the motion from the same reference point because both of us are observing the motion from two points on the same straight line.c. No, we would both view the motion from different reference points because motion is viewed from two different points; the reference frames are similar but not the same.d. No, we would both view the motion from different reference points because response times may be different; so, the motion observed by both of us would be different. 89 x , 16x , -30x please show your work .