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
Sedbober [7]
3 years ago
8

Develop a program that implements the POLYNOMIAL ADT using the LIST ADT. The POLYNOMIAL ADT is used to represent polynomials and

the following operations defined on polynomials:1.Evaluate()(xp, z). Evaluates the polynomial )(xp at the point zx
Computers and Technology
1 answer:
pogonyaev3 years ago
5 0

Answer:

Polynomial Zero() ::= return the polynomial p(x)=0

Boolean isZero(poly) ::= return (poly == 0)

Coefficient Coeff(poly , expon) ::= If (expon tex2html_wrap_inline93 poly) return its corresponding coefficient else return 0

Exponent LeadExp(poly) ::= return the degree of poly

Polynomial Remove(poly , expon) ::= If (expon tex2html_wrap_inline93 poly) remove the corresponding term  and return the new poly  else return ERROR

Polynomial SingleMult(poly , coef , expon) ::= return poly tex2html_wrap_inline105 coef x tex2html_wrap_inline107

Polynomial Add(poly1 , poly2) ::= return poly1 + poly2

Polynomial Mult(poly1 , poly2) ::= return poly1 tex2html_wrap_inline105 poly2

end Polynomial

You might be interested in
A student should always read the directions to a test or question so they know what is expected of them when answering the quest
Kay [80]

I don't know why you needed to ask this but the answer is True

7 0
3 years ago
Read 2 more answers
Define and use in your program the following functions to make your code more modular: convert_str_to_numeric_list - takes an in
Lelechka [254]

Answer:

In Python:

def convert_str_to_numeric_list(teststr):

   nums = []

   res = teststr.split()

   for x in res:

       if x.isdecimal():

           nums.append(int(x))

       else:

           nums = []

           break;

   return nums

def get_avg(mylist):

   if not len(mylist) == 0:

       total = 0

       for i in mylist:

           total+=i

       ave = total/len(mylist)

   else:

       ave = "None"

   return ave

def get_min(mylist):

   if not len(mylist) == 0:

       minm = min(mylist)

   else:

       minm = "None"

   return minm

def get_max(mylist):

   if not len(mylist) == 0:

       maxm = max(mylist)

   else:

       maxm = "None"

   return maxm

mystr = input("Enter a string: ")

mylist = convert_str_to_numeric_list(mystr)

print("List: "+str(mylist))

print("Average: "+str(get_avg(mylist)))

print("Minimum: "+str(get_min(mylist)))

print("Maximum: "+str(get_max(mylist)))

Explanation:

<em>See attachment for complete program where I use comment for line by line explanation</em>

Download txt
7 0
3 years ago
You work for ScreensRUs, a business that sends repair people to sites to fix damaged car windshields. Your employer provides com
Ede4ka [16]

Answer:

tldr; treat this like a brief essay. some reasons would be "having a smartphone makes your job easier", "smartphones can make the job easier to do on the go".

Explanation:

hi there!

ok, so this should be pretty simple.  first, we should take a look at the issue in the scenario;  you're an employee for a company that relies heavily on technology to get your job done and send other employees to their customer's locations.  because of this, getting poor quality mobile phones would make your job a little bit harder to do.

to put this in a little bit of a better perspective, imagine that you're an employee in a store, and your job is to sweep the floor. however, your boss only gives you a dust pan and bad quality broom.  that'd make you wish that you had some better equipment to get your job done faster, right?

a memo is basically a written message in a business place; in modern days, they're usually emails, but back in the day they were letters and such.  for this assignment, treat this like an essay! however, be sure to be to-the-point.

now to answer the question; we've already covered one reason that you could use in the memo: "having a smartphone would make your job easier". now think about what else having a smartphone would do compared to a mobile company phone.  

here's an example of a memo!

good luck! hope this helped.

5 0
3 years ago
How does polling-based network receive work? How is it different than interrupt based network? Describe both functions and list
Alenkasestr [34]

In a polling-based network receives, the operating system keeps checking the status register after a fixed time interval to see whether a device needs hardware attention or not. CPU gradually checks the status of receive bit after a defined time interval of a clock and if the value of receive bit is true then data is moved from the RX register to the memory. In interrupt-based networks, whenever a device needs hardware processing then an interrupt is raised to inform the CPU for device attention. The data of the device is transferred to memory from the network card.

Polling is a protocol, not a hardware mechanism where the device gets attention by CPU. An interrupt is a hardware mechanism, not a protocol where the device gets attention by the interrupt handler. In polling, during receiving, parts of received data need to transfer to memory but in case of interrupts, whole data is transferred at once after receiving is done. An interrupt is a heavy operation as compared to pooling because hardware involves in it. For large amounts of data, Polling becomes an inefficient method. In polling, CPU gradually checks devices at regular intervals whereas the Interrupt handler can send interrupt at any time. Each device has its own Command ready bit which indicates whether the device requires servicing or not. In polling, CPU wastes numerous clock cycles by repetitively checking the command-ready little bit of each device. In Interrupt based network, the interrupt request line indicates whether the device requires servicing or not. In interrupt-based network, CPU cycles not wasted but CPU is disturbed only when device send interrupt signals.  

Relative performance between programmed I/O and DMA:

For determining the relative performance between programmed I/O and DMA, important factors are:

1. Size of data  

2. Frequency of operations

5 0
3 years ago
State why hexadecimal is used to display the error code
maxonik [38]
“Hexadecimal uses digits that more closely resemble our usual base-10 counting system and it's therefore easier to decide at a glance how big a number like e7 is as opposed to 11100111. Higher information density. With 2 hexadecimal digits, we can express any number from 0 to 255.”
7 0
4 years ago
Other questions:
  • Discuss 2D gameplay and how new platforms such as cell phones are taking advantages of this renewed market
    5·1 answer
  • 50+ POINTS AND BRAIN IF CORRECT Chris is working with other employees on a worksheet. The other employees have made comments, bu
    8·1 answer
  • Three IT Companies. Help me please!
    5·2 answers
  • What type of link is used to call this file shown below?
    5·1 answer
  • Which should be your first choice for the most efficient and successful job search method?
    10·1 answer
  • When workers demonstrate patience, are able to manage there emotions, and get along with other employees, which skills are being
    11·2 answers
  • In computing, a(n) _____ is an attack on an information system that takes advantage of a particular system vulnerability. Select
    5·1 answer
  • A carver begins work on the following block of granite that weighs 2700 g. What is the density of the granite?
    13·1 answer
  • What maintains data about various types of objects, events, people, and places?
    10·1 answer
  • You are the system administrator for Precision Accounting Services, which employs 20 accountants and 25 accounting assistants. T
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!