1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
IRISSAK [1]
3 years ago
8

April 107 90 29 31 66 0.344

Computers and Technology
1 answer:
Misha Larkins [42]3 years ago
3 0

Answer:

Check the explanation

Explanation:

with open('stats. txt', 'r') as   # open the file in read mode

   list1 = []   # initialize an empty list

   for i in  . readlines ():  # read every line of file

       for j in i. split ():  # split each line by a space and append it to the list1

           list1. append (j)

   months = [] # initialize required lists to empty list

plate_apperence = []

at_bats = []

runs = []

hits = []

total_bats = []

for i in range(0, len(list1)-1, 7): # use a for loop and give parameters as start,stop and step count

months. append(list1[i]) # append list1 elements to required lists

plate_apperence. append(int(list1[i+1]))

at_bats. append(int(list1[i+2]))

runs. append(int(list1[i+3]))

hits. append(int(list1[i+4]))

total_bats. append(int(list1[i+5]))

for i in range(len(months)): # for each element in months

print("Player's Average Batting and slugging percent for the month ", months[i], " is as shown below")

print("{:.2f}".format(hits[i]/at_bats[i])) # calculate Average batting and slugging percent and print them

print("{:.2f}". format(total_bats[i]/at_bats[i]))

print("\n")

Kindly check the attached images below to get the Code Screenshot and Code Output.

You might be interested in
Is a plotter input output or both
erastova [34]

Answer:

it is output

Explanation:

it just is .

5 0
3 years ago
Oliver is creating an image of a fruit basket. From the basket, he wants the red apples to stand out among the rest so they will
Volgvan
He   can increase   the   thickness   of the paint on the   apples.
Or he can  use glossier  finish on the   apples  to make them stand out...
3 0
3 years ago
Alicia uses a software application to store the names, email addresses, and phone numbers of her friends in alphabetical order. 
SpyIntel [72]

I think she's using Excel.

6 0
3 years ago
Differences between mechanical and optical mouse <br>Plz help me
lutik1710 [3]
Mechanical mouse has a ball that turns rollers inside. If friction is lost between the ball and the mousing surface, or between the ball and the rollers, the mouse fails to work. In order to assure good contact with the mousing surface, the ball must be fairly heavy. When you change directions with the mouse, you must make the ball change rolling directions--an action that inertia likes to prevent.

An optical mouse makes use of an LED and some optics to detect surface texture and the changes in it as the mouse is moved. There are no moving parts
7 0
3 years ago
Using productivity software ensures that the end product will look professional. Please select the best answer from the choices
borishaifa [10]

Answer:

False

Explanation:

5 0
2 years ago
Other questions:
  • Why is timbre an important musical element?
    7·2 answers
  • Explain how the principles underlying agile methods lead to accelerated development and deployment of software.
    6·1 answer
  • Which of the following identifies the patterns used for each data series in a chart?
    13·1 answer
  • Commercial applications are never free<br><br> -True<br><br> -False
    9·1 answer
  • Write a program that will ask the user to input a phrase (multiple word sentence), and an integer value. A static function will
    14·1 answer
  • How to get the home button on your screen?
    13·1 answer
  • If you give an actual answer I'll give brainliest​
    13·2 answers
  • Fill in the blank with the correct term.
    10·2 answers
  • PLS HURRY<br> Look at the image below
    8·1 answer
  • Class.object.method is an example of using the ______<br> to access the elements of a class.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!