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
Which of the following refers to a technology with a three-dimensional computer simulation in which a person actively and physic
weqwewe [10]

Answer:

B. Virtual reality

Explanation:

In a virtual reality context, the visual and auditory senses of the user are fed by data (images, sounds) from the computer using a goggle and earphones.  That allows the person to be totally cut off her real physical environment and be totally immersed into the world (reality) managed by the computer.

Not to be confused with<u> augmented reality</u>, where the physical reality and perception of it aren't changed... but an additional layer of information is added on top of it.  Like pointing your phone camera to a building and getting information about the building displayed on your phone.

7 0
3 years ago
Which of the following correctly stores 45 squared in the variable x?
timama [110]

Answer:

x = 45

x = x ** 2

6 0
3 years ago
How do I turn on your asus chromebook flip?
galben [10]
I believe the charger has to be connected for it to turn on.
3 0
3 years ago
The efficiency and effectiveness of a logistics/supply chain operation are constrained by the location of plants and warehouses
Vika [28.1K]

Answer:

True.

Explanation:

7 0
3 years ago
I have been trying to use brainly recently but i cant because everytime i watch an ad to get an answer, its an interactive ad, s
Troyanec [42]

Answer:

remove ads

Explanation:

by buying a no ad pack

5 0
2 years ago
Other questions:
  • What is called photo and video edition?
    8·1 answer
  • Give some examples of CyberCrime
    9·1 answer
  • What type of program would you use to create a personal budget?
    9·1 answer
  • Josh's boss asked him to write a letter to their customers explaining some upcoming price increases. But Josh was in a hurry to
    8·2 answers
  • The site is not allowing me to purchase the subscription. Please help?
    12·1 answer
  • How to find out what windows version i have?
    10·1 answer
  • 7. Accepting things that happen without trying to change them is known as
    6·1 answer
  • You are the IT security administrator for a small corporate network. The HR director is concerned that an employee is doing some
    13·1 answer
  • Can somebody please help me with these few questions?
    11·1 answer
  • Which of the following could be part of an algorithm?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!