Question: Create a Python program implementing this design: 1 // Declare the necessary variables. 2 Declare Integer hits 3 Declare Integer atBat 4 Declare Real battingAverage

Create a Python program implementing this design:

1 // Declare the necessary variables.

2 Declare Integer hits

3 Declare Integer atBat

4 Declare Real battingAverage

5

6 // Get the number of hits.

7 Display "Enter the player's number of hits."

8 Input hits 9 10 // Get the number of times at bat.

11 Display "Enter the player's number of times at bat."

12 Input atBat

13

14 // Calculate the batting average.

15 Set battingAverage = hits / atBat

16

17 // Display the batting average.

18 Display "The player's batting average is ", battingAverage

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!