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
Why we use cluster computing and hadoop framework for big data sysetm​
Ber [7]

Answer:

Explanation:

Hadoop clusters can boost the processing speed of many big data analytics jobs, given their ability to break down large computational tasks into smaller tasks that can be run in a parallel, distributed fashion.

5 0
2 years ago
Becky is preparing a document for her environmental studies project. She wants to check her document for spelling and grammar er
Sunny_sXe [5.5K]
If it's MS Word (it probably is), then it's Alt + F7
7 0
2 years ago
Read 2 more answers
In which case will the linear search return the lowest value faster than the<br> binary search?
Sveta_85 [38]

Answer:

A linear search is one that scans every record/file until it discovers the value being searched for.

Binary search, on the other hand, is also known as <em>Logarithmic search</em>. It is used to locate the position of a value inside an array that has already been sorted.  

The linear search will return the lowest value faster than the binary search when small arrays are involved.

This will only be feasible when the array is sorted prior.

Cheers!

5 0
3 years ago
The best advice for setting a study session is
ExtremeBDS [4]
To take breaks and not do all the work at once.
3 0
2 years ago
Omar wants to add transitions to his presentation, so he clicks the Transitions tab. Which tasks can he now complete? Check all
ser-zykov [4K]

Answer:

a b c and d

Explanation:

edgunity 2020

7 0
2 years ago
Other questions:
  • HELP ASAP!!!!!!!!! ITS A UNIT TEST: WILL MARK AS BRAINLIEST&gt;
    13·1 answer
  • What do you understand by structured programmingapproach? Also Discuss about bottom up and top down approach.
    8·1 answer
  • If I wanted to repeat an action such as a heading for a paper, it would be helpful to _____. create a citation create a caption
    9·2 answers
  • 1. What makes discrimination different from harassment? (Don't give me definitions.)
    5·1 answer
  • Cuantos MB son 8,192 kb?​
    13·1 answer
  • Private BLANK are cloud services available to members of a particular organization.
    6·1 answer
  • What is the output of the following program? If there is any problem, how can
    13·1 answer
  • Were is the hype house
    5·2 answers
  • Explain how mobile phone production could be more sustainable​
    8·2 answers
  • Use the drop-down menus to complete statements about the Quick Steps function.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!