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

  Create a simplify credit card transaction management program

Create a simplify credit card transaction management program.

  Modify compound interest program

Modify compound interest program

  Estimating the average memory access time

Every data reference which misses in L1 has the 60% chance of hitting in L2. A miss in L1 followed by the hit in L2 has a latency of 10 cycles. Explain the average memory access time for the load data reference within this new con?guration?

  Discuss various types of dbmss

Discuss differences among data, information, and knowledge.

  Creating the object oriented program

Create an abstract Employee class and two pure virtual functions - calculatePay() and displayEmployee(). Abstract Employee class will avoid a programmer from generating an object based on the Employee.

  What is a work breakdown structure

What is  a work breakdown structure

  How to illustrate decision table to represent treatment

How to illustrate decision table to represent treatment? Create a structured English version based on the following dialogue obtained by the Systems Analyst from the client interview below.

  How to enlarge the size of the array

How to enlarge the size of the array? Enlarge the size of the array to 25. Driver will start with 10 objects in it other than has provision for up to 15 new objects. You can use java any API.

  Why grades averaged and sorted from highest to lowest

The names need to be sorted alphabetically why grades averaged and sorted from highest to lowest.

  Express wpan, wlan, wan, rfid, and gps

can someone assist me in understanding the following WPAN, WLAN, WAN, RFID, and GPS.

  Generate a class name that starts with string variable

Generate a class Name that starts with string variable

  Find the waterfall project management methodologies

find the waterfall project management methodologies. If you are asked by your boss to start a specific new project, what are the possible questions you'll ask him/her or what information would you collect from him/her before you leave his/her offic..

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