0

Counting of 1's 2's 3's 4's in T20 game

In a T20 game, AB Devillars have faces 10 balls continuously. In these 10 balls, he scores many 6’s, 4’s, 1’s and 2’s. Two cricket analysts, are trying to find out the following things: finding the average score rate per ball and Number of 1’s, 2’s, 3's, 4’s and 6’s he scored in these 10 balls Design one function, which will help these cricket analysts to find this statistics. Input Format 10 integer numbers (Run scores in each ball) Constraints He didn’t score any 5 in these 10 balls those he have faced He didn’t get same score in consecutive balls. If constraints didn’t matched display “Wrong Input” without quotes. Output Format out put is Number of 1’s, 2’s, 4’s and 6’s and average run per ball in given format Sample Input 0 2 4 6 1 0 4 6 1 2 6 Sample Output 0 1's=2 2's=2 3's=0 4's=2 6's=3 0's=1 Average Score Rate=3.2 per ball Explanation 0 Average Score Rate is Total Run/Total balls

10th Oct 2018, 8:15 PM
Aakash
Aakash - avatar
1 Respuesta
0
Where is your try?
10th Oct 2018, 8:20 PM
KrOW
KrOW - avatar