Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Input

The first line contains a single integer N.
Next N lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes coefficient of Pi.Output

Print the polynomial in the format Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0, where Pi's are powers in decreasing order, Ci is coefficient, and C0 is constant. There will be space before and after the plus or minus sign.
If the coefficient is zero, then don't print the term.
If the term with the highest degree is negative, the term should represent -Cix^Pi.
For the term where power is 1, represent it as C1x instead of C1x^1.
If the polynomial degree is zero and the constant term is also zero, then print 0 to represent the polynomial.
For term Cix^Pi, if the coefficient of the term Ci is 1, print x^Pi instead of 1x^Pi.

Abhinav and Anjali are playing the Tic-Tac-Toe game. Tic-Tac-Toe is a game played on a grid that's three squares by three squares. Abhinav is O, and Anjali is X. Players take turns putting their marks in empty squares. The first player to get 3 of her marks in a diagonal or horizontal, or vertical row is the winner. When all nine squares are complete, the game is over. If no player has three marks in a row, the game ends in a tie. Write a program to decide the winner in the Tic-Tac-Toe game.


b)Classify following example Fast yes or no using baysean classification algorithm Engine = Small , SC/Turbo= Yes , Weight=Light , Fuel Eco= Good


Write Python code for baysean learning to dataset as given in Q1 theory paper .Assume test
data=33% and Dataset contains integers values in dataset.
b) Classify following example Fast yes or no using baysean classification algorithm
Engine = Small , SC/Turbo= Yes , Weight=Light , Fuel Eco= G

Write a python program to check if a given 3-digit number

X is an Armstrong number or not. Note: A number is an Armstrong number if the number is equal to the sum of the Nth power of its digits.


Rearrange Numbers in String


Given a string, write a program to re-arrange all the numbers appearing in the string in decreasing order. Note: There will not be any negative numbers or numbers with decimal part.


Input


The input will be a single line containing a string.


Output


The output should be a single line containing the modified string with all the numbers in string re-ordered in decreasing order.


Explanation


For example, if the given string is "I am 5 years and 11 months old", the numbers are 5, 11. Your code should print the sentence after re-ordering the numbers as "I am 11 years and 5 months old".


Sample Input

I am 5 years and 11 months old

Sample Output

I am 11 years and 5 months old

Sample Input 2:

I am 11 years 5 months, 26 weeks and 38 days old

Sample output:

I am 38 years 26 months, 11 weeks and 5 days old


Simulate a two dimensional random walk and provide a picture of it


By using single layer perceptron algorithm classify the following patterns. Where X1 and X2  are inputs Y is the output. Learning rate is 0.5 , output is 1 if weighted sum >=0.5 otherwise 0 and weights w1 =0.2 and w2 = 0.3

Q2) Do work for both parts (10)
a) Write Python code for baysean learning to dataset as given in Q1 theory paper .Assume test
data=33% and Dataset contains integers values in dataset.
b) Classify following example Fast yes or no using baysean classification algorithm
Engine = Small , SC/Turbo= Yes , Weight=Light , Fuel Eco= Good

Write an algorithm for the network administrator to help him find number of data characters that do not change position even after the data stream is reversed


LATEST TUTORIALS
APPROVED BY CLIENTS