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]
4 years ago
7

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

Computers and Technology
1 answer:
Lera25 [3.4K]4 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 risk management framework does the organization of standardization publish
olga2289 [7]

Answer:

ISO 31000:2009 publishes principles and generic guidelines on risk management.

Explanation:

ISO 31000:2009 can be applied to any public, private or community company, organization, society or individual. Hence, ISO 31000:2009 is not particular to either business or area.

ISO 31000:2009 can be implemented during the period of an industry and to a broad variety of actions, including policies and judgments, guidance, methods, functions, plans, goods, services, and assets.

ISO 31000:2009 can be implemented to any type of danger, whatever its kind, whether possessing positive or negative outgrowths.

3 0
4 years ago
What can I do If my Texas Instrument TI-84 calculator is not giving accurate answers?
zlopas [31]

Answer:

replace the batteries possibly

Explanation:

4 0
2 years ago
How to buy free big money computers that earn free money everydays?
Novay_Z [31]
That would be great if it was possible
8 0
3 years ago
Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicatin
lyudmila [28]

Answer:

Following is the program in C language :

#include <stdio.h> // header file

#define n 5 //  macro

int main() main function

{

   int a[n],k1; // variable and array declaration

   printf("Enter the element:\n");

   for(k1=0;k1<n;++k1) //iterating the loop

   {

       scanf("%d",&a[k1]);//Read the values by user

   }

   printf("Output in Reverse Order:\n");

   for(k1=n-1;k1>=0;--k1)//iterating the loop

   {

   printf(" %d ",a[k1]); //Display the values

   }

   return 0;

}

Output:

Enter the element:

4

3

45

67

89

Output in Reverse Order: 89 67 45 3 4

Explanation:

Following is the description of the program

  • Define a macro "n" with value 5 after the header file.
  • Declared an array "a" and defined the size of that array by macro i.e "n".
  • Read the value by the user by using scanf statement in the array "a"
  • Finally In the last for loop display the values of array "a" by space.

7 0
3 years ago
Tara needs to select all of the text in a Word document. Which keyboard shortcut will achieve this goal?
user100 [1]
Ctrl + a im pretty sure
3 0
4 years ago
Read 2 more answers
Other questions:
  • Matt wants to build an app that will reach many people all over the world. However, he worries about having to modify apps for a
    14·1 answer
  • The HR department of a company wants to send out an email informing its employees about an upcoming social event. Which email ap
    11·2 answers
  • If you press the tab key when you're in in the last cell of a table,
    10·1 answer
  • This toolbar can be used to change the way the text in your presentation looks. Drawing
    5·2 answers
  • ____ allows you to control how objects enter, move on and exit slides
    13·2 answers
  • Video-sharing sites such as youtube and vimeo provide a place to post short videos called clips, true or false?
    10·1 answer
  • My computer just fried anybody know why it did that?
    14·2 answers
  • The road is closed a head
    9·1 answer
  • 1. If we want define style for an unique element, then which css selector will
    14·1 answer
  • Consider that a man is watching a picture of a Black Horse. He receives an external stimulus from input channel. Man gains some
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!