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

Given polynomial write a prigram that prints polynomial in Cix^Pi + Ci-1x^Pi-1....+C1x+C0 format.


sample input:

4

0 5

1 0

2 10

3 6

sample output:

6x^3 + 10x^2 + 5


write a program to check the overlapping of one string's suffix with the prefix of another string


1.Sample input:

ramisgood

goodforall

Sample Output:

good

2.Sample input:

finally

restforall

sample input:

No overlapping




IPL Match Details Write a program that reads all the match outcomes and summarizes the information of all the matches. Points are given to the teams based on the outcome of the match. A win earns a team 3 points. A draw earns 1. A loss earns 0. The following information is expected: MP: Matches Played W: Matches Won D: Matches Drawn (Tied) L: Matches Lost P: Points The team information should be displayed in descending order of points.Input Names of teams may contain spaces but will be less than 24 characters 100 >= N >= 0 Sample Input 6 CSK;RR;loss RR;DD;draw MI;KKR;win KKR;RR;loss CSK;DD;draw MI;DD;draw Sample Output Team: RR, Matches Played: 3, Won: 2, Lost: 0, Draw: 1, Points: 7 Team: MI, Matches Played: 2, Won: 1, Lost: 0, Draw: 1, Points: 4 Team: DD, Matches Played: 3, Won: 0, Lost: 0, Draw: 3, Points: 3 Team: CSK, Matches Played: 2, Won: 0, Lost: 1, Draw: 1, Points: 1 Team: KKR, Matches Played: 2, Won: 0, Lost: 2, Draw: 0, Points: 0
Weekends Given two dates D1 and D2, write a program to count the number of Saturdays and Sundays from D1 to D2 (including D1 and D2). The date in string format is like "8 Feb 2021".Input The first line of input will contain date D1 in the string format. The second line of input will contain date D2 in the string format.Output The output should be a single line containing two integers separated by space.Explanation For example, if the given dates are "25 Jan 2021" and "14 Feb 2021", the Saturdays and Sundays dates from "25 Jan 2021" to "14 Feb 2021" are "30 Jan 2021" is a Saturday "31 Jan 2021" is a Sunday "6 Feb 2021" is a Saturday "7 Feb 2021" is a Sunday "13 Feb 2021" is a Saturday "14 Feb 2021" is a Sunday So the output should be Saturday: 3 Sunday: 3 Sample Input 1 25 Jan 2021 14 Feb 2021 Sample Output 1 Saturday: 3 Sunday: 3
Add two polynomials Given two polynomials A and B, write a program that adds the given two polynomials A and B. Input The first line contains a single integer M. Next M lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes co-efficient of Pi for polynomial A. After that next line contains a single integer N. Next N lines contain two integers Pj, Cj separated with space, where Pj denotes power and Cj denotes co-efficient of Pj for polynomial B. Output Explanation If M = 4 and for polynomial A For power 0, co-efficient is 5 For power 1, co-efficient is 0 For power 2, co-efficient is 10 For power 3, co-efficient is 6. If N = 3 and for polynomial B For power 0, co-efficient is 1 For power 1, co-efficient is 2 For power 2, co-efficient is 4. Then polynomial A represents "6x^3 + 10x^2 + 5", the polynomial B represents "4x^2 + 2x + 1" and the addition of A and B is "6x^3 + 14x^2 + 2x + 6"
Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'. Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters. abcdefghij12345678910 klmnopqr1112131415161718 stuvwxyz1920212223242526Input The input will be a string in the single line containing spaces and letters (both uppercase and lowercase).Output The output should be a single line containing the secret message. All characters in the output should be in lower case.Explanation For example, if the given input is "python", "p" should replaced with "16", similarly"y" with "25","t" with "20","h" with "8","o" with "15","n" with "14". So the output should be "16-25-20-8-15-14"
String Rotation Given two strings(S1 and S2), write a program to determine if a string S2 is a rotation of another string S1. Input The first line of the input will be a string S1. The second line of the input will be a string S2.Output If string S2 is a rotation of another string S1, print number of right rotations made by string S1 to match the string S2. Otherwise, print "No Match". Where right rotation means all elements are moving towards the right side by one place where the last element will be placed in the first place example, one right rotation of "python" is "npytho" For example, if the given strings S1 and S2 are "python" and "onpyth", The first right rotation of s1 is "npytho" which is not equal to string S2"onpyth" The second right rotation of s2 is "onpyth" which is equal to string S2 "onpyth". So output 2 Sample Input 1 python onpyth Sample Output 1 2 Sample Input 2 Python Python Sample Output 2

you are given space- separated integers as input, write a program to print the numbers in the increasing order along with their frequency in python


Prefix Suffix Write a program to check the overlapping of one string's suffix with the prefix of another string.Input The first line of the input will contain a string A. The second line of the input will contain a string B.Output The output should contain overlapping word if present else print "No overlapping".Explanation For example, if the given two strings, A and B, are "ramisgood" "goodforall" The output should be "good" as good overlaps as a suffix of the first string and prefix of next. Sample Input 1 ramisgood goodforall Sample Output 1 good Sample Input 2 finally restforall Sample Output 2 No overlapping
Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'. Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters. abcdefghij12345678910 klmnopqr1112131415161718 stuvwxyz1920212223242526Input The input will be a string in the single line containing spaces and letters (both uppercase and lowercase).Output The output should be a single line containing the secret message. All characters in the output should be in lower case.Explanation For example, if the given input is "python", "p" should replaced with "16", similarly"y" with "25","t" with "20","h" with "8","o" with "15","n" with "14". So the output should be "16-25-20-8-15-14".
LATEST TUTORIALS
APPROVED BY CLIENTS