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

The Springfork Amateur Golf Club has a tournament every weekend. The club president

Computers and Technology
1 answer:
Lera25 [3.4K]3 years ago
6 0

Answer:

The Python code is given below for each question.

Explanation:

1:

 if __name__ == '__main__':

   f = open('golf.txt', 'w')

   n = int(input("Enter number of players:"))

   for i in range(n):

       name = input("Enter name of player number " + str(i + 1) + ":")

       score = int(input("Enter score of player number " + str(i + 1) + ":"))

       f.write(name + "\n" + str(score) + "\n")

   f.close()

2:

try:

   with open('golf.txt') as r:

       lines = r.readlines()

       for i in range(0, len(lines), 2):

           print("Name:", lines[i].strip())

           print("Score:", lines[i+1].strip())

           print()

except FileNotFoundError:

   print("golf.txt is not found!")

You might be interested in
The____________ is becoming the preferred organizational structure for more andmore organizations with the passage of time.
mario62 [17]

Answer: Hierarchical structure

Explanation:

The hierarchical structure is the most preferred structure for an organisation. As more and more people join an organisation with the passage of time we can clearly see the different links between the persons and the their hierarchical level to the organisation. In this process it becomes easier to manage the people at the various levels.

7 0
3 years ago
Jason wants to open a program with the command prompt window. Which command should he type in the Run dialog box to open the com
Svetradugi [14.3K]
The name of the command prompt executable is cmd.exe so just type that.
5 0
3 years ago
Read 2 more answers
Which of the following will not cause the supply of internet service to increase?
Rus_ich [418]

Answer:

c

Explanation:

5 0
3 years ago
Now suppose that the file is broken into 5 packets, each of 10 Mbits. Ignore headers that may be added to these packets. Also ig
Vesnalui [34]

Answer:

6.025seconds

Explanation:

For each link we have,

Dtran = 10mbits/10mbps =1 second

Dprop = 5000km/2×10^8m/sec =0.025sec.

Total delay =( 5 + 2-1) + Dtran+ 2 Dprop= 6.025seconds

4 0
3 years ago
Write a simple JavaScript function named makeFullName with two parameters named givenName and familyName. The function should re
Kazeer [188]

Answer:

Explanation:

Ji

3 0
3 years ago
Other questions:
  • Technological _____ is the term used to describe the merging of several technologies into a single device.
    13·1 answer
  • There are many modes of remote visual communication. Which is the most common mode?
    10·2 answers
  • Some people are unable to arrange six matches to form four equilateral triangles because they fail to consider a three - dimensi
    6·1 answer
  • Andy is trying to put together a holiday gift knapsack (with W=8) for Sarah. He has n items to choose from, each with infinitely
    15·1 answer
  • Implement a recursive method named power that takes 2 integer parameters named base and expo. The method will return the base ra
    6·1 answer
  • A computer game that can be purchased online and played right away has good _____ utility.
    11·1 answer
  • Which documents might an employer expect to find in a career portfolio?
    15·2 answers
  • If your pulse is higher than your Target Heart Rate during exercise, what should you do?
    5·2 answers
  • How to delete the last element in array
    15·1 answer
  • Which of the following statements is false?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!