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
jeka94
2 years ago
7

When a file is used by a program, there are three steps that must be taken:

Computers and Technology
1 answer:
Greeley [361]2 years ago
4 0

The three steps that must be taken:

  • Open the file
  • Process the file
  • Close the file

<h3>What is file opening?</h3>

The act of Opening a file is one that makes a a connection to exist between the file and the program.

Note that The three steps that must be taken:

  • Open the file
  • Process the file
  • Close the file

Learn more about program from

brainly.com/question/1538272

#SPJ12

You might be interested in
Write a program to calculate student's average test scores and the grade. You may assume the following input data:
Brums [2.3K]

Answer:

def gradeAverage():

   grades = []

   i = 0

   while i < 5:

       a = int(input('enter score ' + str(i + 1) + ': '))

       grades.append(a)

       i = i+1

   #print(grades)

   average = sum(grades)/len(grades)

   #print(average)

   return average

def lettergrade(a):

   letter = 'A'

   if a < 60:

       letter = 'F'

   elif 59 < a < 63:

       letter = 'D-'

   elif 62 < a < 67:

       letter = 'D'

   elif 66 < a < 70:

       letter = 'D+'

   elif 69 < a < 73:

       letter = 'C-'

   elif 72 < a < 77:

       letter = 'C'

   elif 76 < a < 80:

       letter = 'C+'

   elif 79 < a < 83:

       letter = 'B-'

   elif 82 < a < 87:

       letter = 'B'

   elif 86 < a < 90:

       letter = 'B+'

   elif 89 < a < 94:

       letter = 'A-'

   elif 93 < a < 101:

       letter = 'A'

   return letter

numOfStudents = int(input('How many students: '))

names = []

aver = []

grade =[]

while numOfStudents > 0:

   studentName = input('Enter students name: ')

   names.append(studentName)

   a = gradeAverage()

   aver.append(a)

   grade.append(lettergrade(a))

   numOfStudents = numOfStudents - 1

for name in names:

       for score in aver:

           for letter in grade:

               if names.index(name) == aver.index(score) == grade.index(letter):

                   print('%s : Average =  %d  Letter Grade:  %s \n' %(name, score, letter))

                   break

Explanation:

The programming language used is python.

Two functions were created, the first function gradeAverage() was used to calculate the average values of the scores.

The second function lettergrade(a) was used to get the letter grade i.e(A, A-, C, D, e.t.c.) and it takes its argument from the average.

The main block of code asks for how many students are there and prompts the user to input their names and scores for all the students.

It takes that data calculates the average and the letter grade and prints out the names of the students, their average and their letter grade.

7 0
3 years ago
Write a program that calculates and displays the amount ofmoney available in a bank account that initially has $8000 deposited i
Leviafan [203]

Answer:

Written in Python

import math

principal = 8000

rate = 0.025

for i in range(1, 11):

    amount = principal + principal * rate

    principal = amount

    print("Year "+str(i)+": "+str(round(amount,2)))

Explanation:

This line imports math library

import math

This line initializes principal amount to 8000

principal = 8000

This line initializes rate to 0.025

rate = 0.025

The following is an iteration from year 1 to 10

for i in range(1, 11):

    This calculates the amount at the end of the year

    amount = principal + principal * rate

    This calculates the amount at the beginning of the next year

    principal = amount

    This prints the calculated amount

    print("Year "+str(i)+": "+str(round(amount,2)))

6 0
4 years ago
How to fix an lg TV that would turn on but there is only one channel working.
bogdanovich [222]
In desperation, and with the clock ticking down to the must-see Reds v Crusaders game, I gambled on running the 'factory reset' function, then reinstalling all the channels.

Result: success!

Might be a useful tip for anyone else who finds themselves with this problem.

<span>Cheers</span>
4 0
4 years ago
Read 2 more answers
What impact has the wireless web had on business and society?
HACTEHA [7]
The web has changed this society in many different ways:
1. education 
2. enviormental protection 
3. news reporting 
4. social changfes
5 0
3 years ago
Read 2 more answers
I don't know. plz help
Simora [160]
The third option is correct
5 0
3 years ago
Other questions:
  • You are writing an email to a potentional employer about a job opportunity. What can you do to make sure the email reflects your
    15·2 answers
  • Here are some instructions in English. Translate each of them into the Simple Machine language.
    12·1 answer
  • Nina's grades could be better. She gets about five hours of sleep every weeknight and ten hours per night on weekends. How much
    11·2 answers
  • Change the shape fill color to Dark Red. It is the first option in the Standard Colors section of the color palette.
    13·1 answer
  • A _ fire extinguisher should be used on a computer fire
    15·1 answer
  • Ssume that the timeout values for all three protocols
    8·1 answer
  • Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. T
    7·1 answer
  • How do I put in a micro sd card that is in a sd adapter in to my laptop to make it work PLEASE HELP
    10·1 answer
  • PLSS HELP ASAP ILL GIVE BRAINLIES THANKS
    7·2 answers
  • 236. A system such as a printer, smart TV, or HVAC controller, typically uses an operating system on what is called a:
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!