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
Hodaya missed several days of her online nursing class and needs to catch up. The most effective way she can do
Snowcat [4.5K]

Answer

send an individual e-mail to her teacher for advice.

8 0
3 years ago
Read 2 more answers
Should I download RAM on my computer?
jenyasd209 [6]

Well, if you want to, make sure it's safe.

I don't know what RAM really is, but check if it's safe first. And maybe talk it out with your parents.

That's all I gotta say!

7 0
3 years ago
Read 2 more answers
Which of the following is NOT an option in the comments group
IgorLugansk [536]
I need the options to help you out, thanks. :)
4 0
3 years ago
A modem is required for ________________ internet access.
irakobra [83]
Broadband I believe!
8 0
3 years ago
Why can't cruise control work under 25 mph?
beks73 [17]
<span>At lower speeds modulating speeds is a must for safety. I would be hard pressed to find a place in town you could drive 25 mph for an extended time. Also, plan on a lot of shifting at lower speeds. That completely negates using the cruise on a manual and really puts the auto in the hunting mode. I would think it safer that you move the selector into a lower gear to get some engine braking at say, 25 mph which would make it easier to sustain the speed rather then use the cruise.

Brainliest please?</span>
4 0
4 years ago
Other questions:
  • Longer speeches should be separated into the paragraphs of:
    9·1 answer
  • List two ways that guest could be defined
    12·2 answers
  • Signs that a listener is paying attention include:
    10·2 answers
  • 4.12 LAB: Using math methods Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to
    10·1 answer
  • The ____ contains app buttons that allow you to quickly run the File Explorer or Microsoft Edge apps.
    12·1 answer
  • PLEASE HELP ME I WILL GIVE BRAINIEST AND 40 POINTSPython Project Worksheet
    12·1 answer
  • A method signature for a method consists of all elements of the method except the body. That is, a method signature consists of
    14·1 answer
  • Write<br> algorithm to read 100 numbers<br> then display the largest.
    9·1 answer
  • AI is not embraced everywhere in every industry because _______.
    7·1 answer
  • Which window shows instructions for a lab activity?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!