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
When should you save your document?
Verdich [7]

Answer:

b. when you have completed a document

4 0
3 years ago
Read 2 more answers
2. The On and Off states are represented by _____________ class 7 number system​
Artist 52 [7]

Answer:

Binary maybe, I think so

4 0
1 year ago
Read 2 more answers
What is the most commonly used tab in the Filter dialog box?
aleksandrvk [35]

The answer is Messages

3 0
3 years ago
Read 2 more answers
Everfi module 7 answers
Nat2105 [25]
What is the question?
7 0
2 years ago
Does a triangle with sides of lengths 1.5 ft, 2.5 ft, and 2 ft form a right triangle? How do you know?
timama [110]

Answer:

Yes, the side lengths of 1.5, 2.5, and 2 ft form a right triangle.

Explanation:

Before we solve this problem, we need to know a couple of things.

In a right triangle, you have two legs and a diagonal line that goes from one leg to the other or from one side to the other. This line is called the hypotenuse. It is the longest side of a right triangle. This length can be calculated by using a special formula that is over a thousand years old.

The formula is called the Pythagorean Theorem.

The formula states that if you square one leg and the other leg and add it up. You get the side of hypotenuse which is squared as well.

Here it is in simple terms: a^{2} +b^{2} =c^{2}.

a and b are your two legs.

C is your hypotenuse.

In this case 1.5 and 2 are your legs and 2.5 is your hypotenuse since it is the longest side.

Before we calculate, there is a converse to the Pythagorean Theorem.

If a^{2} +b^{2} \neq c^{2}, then it is not a right triangle.

Lets make 1.5 for a

and 2 for b.

We know 2.5 is for c.

Here it is.

1.5^{2} +2^{2} =2.5^{2}. The / means it is a fraction.

1.5 squared is 9/4 and 2 squared is 4. Add 4 and 9/4 and you get 25/4 squared. Take the square root of 25/4 and you get 5/2.

5/2 is equal to 2.5, so the Pythagorean Theorem applies to this triangle. Therefore, these side lengths do form a right triangle.

Hope this helps!

3 0
3 years ago
Other questions:
  • What type of restrictions may be placed on your license?
    7·1 answer
  • Technician A says that the push rod connects to a pivoting component mounted at the top of the cylinder head called the camshaft
    14·2 answers
  • Is this statement true or false?
    12·2 answers
  • Next, go to the mw_tour.html file. Within the document head, create links to the mw_layout.css and mw_styles.css style sheet fil
    10·1 answer
  • What do you think is the most fascinating aspect of the Internet
    5·2 answers
  • How to delete Brainly account ?​
    12·1 answer
  • Hi wanna play fortnite tomorrow add me im batjoker09 no caps or spaces
    13·1 answer
  • In which drawer do you find blocks that allow you to use the A and B buttons on your micro:bit?
    13·2 answers
  • Which generation computer supported GUI operating system?​
    11·1 answer
  • Taking control of admin functionality and misusing sensitive data that are unauthorized to access are due to.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!