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
Vinil7 [7]
3 years ago
7

A file named "games.txt" exists and has 80 lines of data. You open the file with the following line of code.

Computers and Technology
2 answers:
lapo4ka [179]3 years ago
8 0

Answer:

The answer is 3

Explanation:

Edge 2021.

kirill115 [55]3 years ago
3 0

Answer:

2 lines

Explanation:

The "w" flag will overwrite any content, so the existing 80 lines are lost.

Then, if you write two lines, there are two lines in the file.

You could argue that the final newline character causes a third line to be present, but logically, there are two lines.

You might be interested in
Which site was launched by Ben t Smith iv
Kryger [21]

He launched the site "Wanderful Media".

5 0
3 years ago
April 107 90 29 31 66 0.344
Misha Larkins [42]

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.

3 0
3 years ago
Briefly explain how developers use a distributed version management system. You may assume that a master repository has been set
Akimi4 [234]

Answer:

Using version control tools like Git and Github.

Explanation:

Version control is a vital tool in programming in recent times. it helps to prevent loss of source codebase and creating unwanted folders for storing multiple codebases to prevent excess storage usage and time consumption.

Git and Github is a platform that handles version control and collaboration between co-workers. When a repository is created, its initial branch is called the master branch and when a staged code is committed, the commit is recorded. These records can be retrieved using the commit hash value and resetting the current unstaged file or code. A new branch can created to hold a different version of an application and merged later with the master branch.

4 0
3 years ago
Can someone help me
Shtirlitz [24]
If u dont have anything important on there reboot it if you do choice 5
8 0
3 years ago
The development of various technologies led to many historic events. Use information from the Internet to describe one major his
kati45 [8]

Answer:

The Compass

Explanation:

The compass was one of the foremost technological inventions that forever changed sea navigation.

Before its invention, sailors used landmarks to navigate and when it got dark, they had to stop and wait for daybreak before resuming their journey. Some other people used the inaccurate means of the sun and stars to navigate at sea.

But with the invention of the compass, all these problems were a thing of the past because the compass could provide direction despite the weather or time of the day and as a result, it opened more trade routes and assisted in the Age of Discovery.

4 0
3 years ago
Other questions:
  • Add a checkbox associated with each label. The first checkbox should have name and id of "likeCats" and be initially checked. Th
    5·1 answer
  • Read each scenario, and then select the best wireless device for the worker’s needs. A trucker is constantly on the road. He fre
    8·2 answers
  • Write a program segment that simulates flipping a coin 25 times by generating and displaying 25 random integers, each of which i
    5·1 answer
  • If a code word is defined to be a sequence of different letters chosen from the 10 letters A, B, C, D, E, F, G, H, I, and J, wha
    15·1 answer
  • Assume that month is an int variable whose value is 1 or 2 or 3 or 5 ... or 11 or 12. Write an expression whose value is "jan" o
    10·1 answer
  • What is the purpose of filters in a database?
    11·1 answer
  • They convert energy from the Sun into usable chemical energy by the process of photosynthesis. They are
    11·1 answer
  • I need help in raft survival ocean nomad I was traveling and now I can't enter the island or go back home (raft). Please help me
    15·1 answer
  • Note: You can use a word document to write your answers and copy-paste your answer to the area specified. a. (5 points) Convert
    12·1 answer
  • F. Practical Questions
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!