Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you help me, with the problem with multiplication, I can't get why that is the answer..... Can you make the program easier to understand?

can you help me, with the problem with multiplication, I can't get why that is the answer..... Can you make the program easier to understand? can you make the output in specific at the answer: that shows the term. Like this.

image text in transcribed

image text in transcribed

The code: PLEASE SHOW THE RESULT OF THE PROGRAM

import numpy px_terms = int(input('Enter number of terms in px: ')) qx_terms = int(input('Enter number of terms in qx: ')) poly = {} for i in range(px_terms): ele = int(input('Enter coefficient {} for px: '.format(i + 1))) # if 'px' is not present already, add empty list with 'px' as key if 'px' not in poly: poly['px'] = [] # after adding empty list with 'px' as key, append input to the list # I added this line because it also add 1st coefficient to the list. poly['px'].append(ele) # else, append input to the list else: poly['px'].append(ele) for i in range(qx_terms): ele = int(input('enter coefficient {} for qx: '.format(i + 1))) # if 'qx' is not present already, add empty list with 'qx' as key if 'qx' not in poly: poly['qx'] = [] # after adding empty list with 'qx' as key, append input to the list. # I added this line because it also add 1st coefficient to the list. poly['qx'].append(ele) # else, append input to the list else: poly['qx'].append(ele) option = input('Select Addition, Subtraction, Multiplication, Division: ') if option.lower() == "addition": print(numpy.polynomial.polynomial.polyadd(poly['px'], poly['qx'])) if option.lower() == "subtraction": print(numpy.polynomial.polynomial.polysub(poly['px'], poly['qx'])) if option.lower() == "multiplication": print(numpy.polynomial.polynomial.polymul(poly['px'], poly['qx'])) if option.lower() == "division": qu, re = numpy.polynomial.polynomial.polydiv(poly['px'], poly['qx']) print("Quotient: ", qu) print("Remainder: ", re) 
of terms 3 Loup Enter number in pa: B Enter number of terms in ax Enter coefficient 1 for Coefficient ? for px: Enter Coefficient 3 for 23 ". 13 : 25 Coefficient I for 9x: 45 Coefficient 2 for gx. 43 Enter Enter coefficient 3 for qx .57 Select Addition > Answer I: Answer 2: Subtraction, Multiplication, Divisiasi Multiplication 1,085 1 849 1,425 4,309 Anguer si Total Composite Function 2.1 x C:\Users\user\PycharmProjects\pythonProject\venv\Scripts\python.exe "C:/Users/user/PycharmProjects/pyt Enter number of terms in px: 3 Enter number of terms in qx: 3 Enter coefficient 1 for px: 23 Enter coefficient 2 for px: 43 Enter coefficient 3 for px: 12 enter coefficient 1 for qx: 45 enter coefficient 2 for qx: 43 enter coefficient 3 for qx: 23 Select Addition, Subtraction, Multiplication, Division: multiplication 41035. 2924. 2918. 1505. 276.] Process finished with exit code o Make as the sample thaks above TODO O Problems Python Packages Python Console 2 Terminal

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions

Question

What are the HR forecasting techniques?

Answered: 1 week ago

Question

5. Develop the succession planning review.

Answered: 1 week ago