Question: 1-A Program: Baseball Batting Stats Input batting data from user as shown in Example Input. Calculate batting stats based on the following formulas: o Batting
1-A Program: Baseball Batting Stats Input batting data from user as shown in Example Input. Calculate batting stats based on the following formulas: o Batting average: number of hits divided by number of times at bat o Strike out average: number of strike outs divided by number of times at bat Print out the results formatted with 3 places past the decimal along with all input and calculated data in the format shown in Example Output. Follow standard programming procedures including initializing all variables prior to usage, variable naming conventions, use of constants where appropriate, code separated into IPO sections, and appropriate comments. NOTE: Do not use any Python programming techniques that we have not yet covered in class. This includes lists, arrays, functions and tuples. Example Input: Enter number of At Bats: 382 Enter number of Hits: 117 Enter number of Strike Outs: 57 Example Output: Number of Bats: 382 Number of Hits: 117 Number of Strike Outs: 57 Batting Average: 0.306 Strike Out Average: 0.149 Use Python
Example Input: Enter number of At Bats: 382 Enter number of Hits: 117 Enter number of Strike Outs: 57 Example Output: Number of Bats: 382 Number of Hits: 117 Number of Strike Outs: 57 Batting Average: 0.306 Strike Out Average: 0.149
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
