Answer:
When we know how many times a loop is going to occur when we make use of them for a loop. Like if we want to print a number 100 times, then we make use of them for a loop. However, if we only know the condition then we make use of the while loop.
Like while( sum<=100):
sum +=i
i=i+1
And this will add till sum <=100.
Hence, while requires us to know the number of times the loop will take place. And while requires a condition. On many occasions, both can be used. However, it must be understood that we increment the loop number at the end in case of the while loop and the beginning in case of a loop.
Explanation:
Please check the answer section.
Answer:
A. file locking.
Explanation:
File locking in computer technology is a data management mechanism used by software developers to completely restrict access of other users to a software program or computer file by granting permissions to only one user who can delete, modify or edit the application program at any point in time. This simply means that in the software development life cycle (SDLC), file locking is used to avoid interceding update on a particular software by restriction of other users while it's being modified by another user.
For instance, if two users (Gina and Mike) open the same software program, Gina then proceed to modify and save the changes. If Mike also modifies the software program and saves it, this would overwrite Gina's update. Hence, in order to prevent this type of conflict in software development, it is highly recommended that a file locking mechanism is adopted.
<em>This ultimately implies that when Gina make changes to a file, no one else is allowed to access the file because a file locking mechanism is being used by Gina's company as a version control process. </em>
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