Create a good design of the functions to make the best use

Assignment Help Computer Engineering
Reference no: EM1332307

Write a Python program that will first ask the number of overs each team will bat. The program then will continue to ask the score board people to input the runs for every ball for Team A until the team gets all out or they run out of overs. Do NOT prompt a message like "Enter runs :" for each ball.

Each over has just six balls, and you do not need to worry about extra balls due to No Balls, Wide etc in this program. Also you do not need to worry about multiple things happening for a ball. For example, you do not need to consider cases where a team gets runs and at the same time loses a wicket for the same ball. For one ball only one thing will be happening.
The program should display a running total score for the team. When the loop finishes the program should display the total score, number of wickets lost, and the number of overs played by Team A.

The program then should do the same for Team B. When the loop finishes for Team B the program should display the total scores, number of wickets lost and number of overs played by both teams. An extra termination condition of the loop for Team B will be if the running total score of Team B exceeds the total score of Team A.

The program will also display the winning team and the result. That is, if Team A wins then it will display the result in terms of runs. For example, Team A wins by 54 runs, which is the difference between the total runs scored by the teams. However, if Team B wins then the program will display the result in terms of wickets. For example, Team B wins by 3 wickets.

The program will need to keep track of number of balls played, and number of wickets lost by a team. Use multiple functions, instead of using only one function to do everything. Make a good design of the functions to make the best use of the code and avoid duplicate calculations.

Reference no: EM1332307

Questions Cloud

Explain security be maintained in global e-commerce : Explain Security be maintained in global e-commerce and How can security be maintained in global e-commerce
How to write a python program : design a Python program that would prompt the user for the number of employees to be entered, and then prompt for employee name, followed by wage, followed by hours worked.
Expansionary fiscal policy : Using the material from the case assignment, would the implementation of a tariff be considered expansionary or contractionary fiscal policy? Explain.
Describe the process of organizational development : Prepare a paper in which you examine the concept of organizational development - describe the process of organizational development
Create a good design of the functions to make the best use : Write down a Python program that will first ask the number of overs each team will bat. The program then will continue to ask the score board people to input the runs for every ball for Team A until the team gets all out or they run out of overs. ..
Drivers to cash flow : Recognize two key drivers to cash flow. How do such drivers impact corporate value? Illustrate out the term market efficiency. Write down the name of some of ambiguities which are encountered in accounting on an accrual basis?
Impact of hurricane katrina on citizens : Discuss what steps that State and local officials might have taken early in the first days of Katrina.
Explain kohlberg''s trends and findings : Do you believe Kohlberg's trends and findings are credible and State whether you agree or disagree, and why
Evaluate a standard web hosting provider : How can a customer evaluate a standard web hosting provider?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Determining stationary points of function

Determine the stationary points of function F(x)=2x_1^3-3x_1^2-6x_1 x_2 (x_1-x_2-1). Which points among these are local minima, which are local maxima, and which are neither?

  Implementing the java code

Write down the Java program with following statements respectively.cascading if/else statement,

  How to use the same naming conventions

how to use the same naming conventions and that their programs work together even though they are created independently.

  How the core issue depend on who wrote the code

how the core issue depend on who wrote the code

  How to create a class named integerset

A set is represented internally as an array of Booleans. Array element a[i] is true if integer "i" is in the set. Array element a[j] is false if integer "j" is not in the set. The no-argument constructor initializes a set to the so-called "empty s..

  Context free language

Let L1 be the regular language and L2 be the context-free language, both described over the same alphabet Σ. a) Is L1∩L2 always regular? Explain your claim.

  Program that uses class to create many fields

write a program that uses class to create many fields.

  Explain in details what are structures

Explain in details what are structures.

  Dissolve method

It does this by incrementing (by 1) all the three color elements (utilizing the above accessor and mutator methods) as well as alpha component value. Write down the dissolve method.

  What is the throughput

Measurements of the slotted ALOHA channel with an infinite number of users show that 10 percent of the slots are idle.

  The c++ libraries on strings have many functions

The C++ libraries on strings have many functions that can be used to handle various string operations. Write a function called stringlast that can be used to find the last n characters in a string and return a pointer to this new string

  Where is the reason of most of the attacks

Where is the reason of most of the attacks.explain the differences between the two main classes of intrusions: misuse and anomaly.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd