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

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.Inpu 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
Tic-Tac-Toe game 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. Input The input will be three lines contain O's and X's separated by space. Output The output should be a single line containing either "Abhinav Wins" or "Anjali Wins" or "Tie". Explanation For example, if the input is O X O O X X O O X as three of O's are in vertical row print "Abhinav Wins". Sample Input 1 O X O O X X O O X Sample Output 1 Abhinav Wins Sample Input 2 O O X X X O X O O Sample Output 2 Anjali Wins i want exact sample outputs sir
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.Inpu 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

Accessing Nested Lists


Write a program to create a list with the values at the given Indexes.


Sample Input 1

3

1  2

0 3

0 1

Sample Output 1

['hockey','grapes','banana']


Nested List Indexing


Write a program to print the index of the given number N in the list of tuples.


Sample Input 1 

4

Sample output 1

0 1 


Sample Input 2

15

Sample output 2

1 1


List of Lists to List of Tuples

Write a program to convert the list of lists to a list of tuples.

Sample Input1

3

1  2 3 4 

10  20 30

5 10 15 20

Sample Output 1

[(1,2,3,4), (10,20,30), (5,10,15,20)]


Remove N in all Tuples


Write a program to remove the given number N in all the tuples if it present.


Sample Input 1

3

Sample output 1

[(1,2,4,5,6), (2,4,6,8), (1,5,7)]


List of Unique Tuples


Write a program to print the lists which contain the unique elements in the given list of lists.


Sample Input 1

3

1  2  3

5 10 15

10 20 10 30

Sample output 1

[[1,2,3],[5,10,15]]


Character Frequency


Write a program to compute the frequency of characters other than space.


Sample Input 1

Pop up

Sample Output 1

o: 1

p: 3

u: 1


First Perfect Square Given two integers (M and N), write a program to print the first perfect square in a given range.Input The first line of input will contain a positive integer (M). The second line of input will contain a positive integer (N).Output The output should be a single line containing the first perfect square in a given range.Explanation For example, if the given numbers are M is 4 and N is 16, the perfect squares from 4 to 16 are 4(2 * 2), 9(3 * 3), and 16(4 * 4), as the first perfect square is 4. So the output should be 4. Sample Input 1 4 16 Sample Output 1 4 Sample Input 2 5 8 Sample Output 2 No Perfect Square
LATEST TUTORIALS
APPROVED BY CLIENTS