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
mr_godi [17]
3 years ago
6

Which is the best programming practice?

Computers and Technology
1 answer:
irina [24]3 years ago
4 0

Answer:

Open a file when the program needs to work with it and close the file as soon as you have finished using it.

Explanation:

In programming, we have some files that are stored in memory, or created in some other section of the program to save information.

<u><em>for example</em></u>, we want to save the data of a class or school faculty to create a database. For this purpose I need to create a file.

As the files that we will create may contains data, these files will utilize computer resources such as, memory (RAM, Cache) and other resources. While programming, we need these resources as well.

<em>Therefore, It is necessary to open a file when the program needs to work with it and close the file as soon as we have finished using it. The reason is that, it takes computer resources which are limited.    </em>

You might be interested in
When 2 or more computers are connected it is called?
Alenkasestr [34]

When two or more computers are connected it is called Local Area Network (LAN).

5 0
3 years ago
1. Write a high level algorithm for cooking a cheeseburger.
pishuonlain [190]

Answer:

1.  A high level algorithm for cooking a cheeseburger could be:

  1. Heat fry pan
  2. Cook one side of the hamburger
  3. Wait
  4. Turn hamburger upside down
  5. Put cheese over hamburger
  6. Wait
  7. Cut hamburger bread in half
  8. Put cooked hamburger inside bread
  9. End (eat)

2. A detailed algorithm for cooking a cheeseburger could be:

  1. Place fry pan over the stove heater
  2. Turn on heater (max temp)
  3. IF fry pan not hot: wait, else continue
  4. Place raw hamburger on fry pan
  5. IF hamburger not half cooked: Wait X time then go to line 5, else continue
  6. Turn hamburger upside down
  7. Put N slices of cheese over hamburger
  8. IF hamburger not fully cooked: Wait X time then go to line 8, else continue
  9. Turn off heater
  10. Cut hamburger bread in half horizontally
  11. Put cooked hamburger on one of the bread halves.
  12. Put second bread half on top of hamburger
  13. End (eat)

Explanation:

An algorithm is simply a list of steps to perform a defined action.

On 1, we described the most relevant steps to cook a simple cheeseburger.

Then on point 2, the same steps were taken and expanded with more detailed steps and conditions required to continue executing the following steps.

In computational terms, we used pseudo-code for the algorithm, since this is a list of actions not specific to any programming language.

Also we can say this is a structured programming example due to the sequential nature of the cooking process.

7 0
3 years ago
Koi friend online hai kya​
Arlecino [84]

Answer:

yes

good afternoon friend

8 0
2 years ago
The ______ manages the hardware components including the cpu, memory storage, and peripheral devices. options operating system d
Alexandra [31]
The answer is the os or operating system
8 0
3 years ago
¿El auto es un servicio tecnológico? / The car is a technological service?
EleoNora [17]
A car isn’t technological, It runs on gas. Hopes this helps :p
4 0
3 years ago
Other questions:
  • to move from the second cell in the table in the accompanying figure back to the previous cell, press the ____ key(s)
    10·1 answer
  • What type of device is the printer?
    13·2 answers
  • 15. What type of presentation includes information created in a different Office application?
    7·1 answer
  • You want to make it possible for your smartphone to share its internet access wirelessly with your friends device which of the f
    10·1 answer
  • What are the advantages of businesses using Twitter ?
    12·1 answer
  • If you were looking for a record in a very large database and you knew the ID number, which of the following would be the most d
    6·1 answer
  • Which one of the following pieces of information would be allowed as part of a limited data set?
    15·1 answer
  • What will the following code display?
    12·1 answer
  • ARGENT !!20 POINTS <br> А ________ translates commands from a computer to draw lines on paper.
    10·2 answers
  • Which digital cellular standard is used widely throughout the world except the united states?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!