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
Dmitry [639]
2 years ago
14

What is a file and where can we make use of a file?​

Computers and Technology
1 answer:
Gekata [30.6K]2 years ago
8 0

Explanation:

<h3>A file is an object on a computer that stores data, information, settings, or commands used with a computer program. On a computer there are three types of files, application files, data files, and system files.</h3>

<h2>hope it helps. </h2><h2>Stay safe healthy and happy.</h2>
You might be interested in
An iPad Is An Example Of Which Type Of Computer?
Monica [59]
B.tablet because it is technically not a computer in traditional sence but a hand held device.
<span />
5 0
3 years ago
Read 2 more answers
Windows Rights Management Services is used in conjunction with which Microsoft applications?
Mariana [72]
“Word” is your answer
6 0
2 years ago
Write a function called count_occurrences that takes two strings. The second string should only be one character long. The funct
iVinArrow [24]

Answer:

Here is the Python function:

def count_occurrences (string1 , string2):  # method that takes two strings as parameter and returns how many times second string occurs in first

   count = 0  #counts number of occurrence of string2 in string1

   for word in string1:  #iterates through each word of the string1

       for character in word:  #iterates through each character of each word in string1

           if character == string2:  # checks if the character in string1 is equal to the character of string2

               count = count + 1  #adds 1 to the count of string2 in string1

   return count  #returns number of times the string2 occurs in string1

#in order to check the working of the function add the following lines to the code:    

first_str = input("Enter the first string: ")  #prompts user to enter first string

second_str = input("Enter the second string (one character long): ") #prompts user to enter second string which should be one character long

occurrence = count_occurrences(first_str,second_str)  #calls count_occurrences method by passing both strings to it

print(second_str,"occurs",occurrence,"times in",first_str) #prints how many times the second_str occurs in the first_str on output screen

Explanation:

The program is well explained in the comments added to each statement of the above code. I will explain the program with an example:

Suppose

string1 = "hello world"

string2 = 'l'

So the method count_occurrences() should return how many times l occurs in hello world.

count is used to count the number of occurrences of l in hello world. It is initialized to 0.

The first loop iterates through each word of string1. The first word of string1 is "hello"

The second loop iterates through each character/letter of each word. So the first letter of "hello" word is 'h'.

The if condition if character == string2: checks if the character is equal to string2 i.e. l.

character = "h"

string2 = "l"

The are not equal so the program moves to the next character of word hello which is e. The if condition again evaluates to false because e is not equal to l. So the program moves to the next character of word hello which is l.

This time the if condition evaluates to true because

character = "l"

string2 = "l"

character == string2

l == l

So the if part is executed which has the following statement:

count = count + 1

So the count is added to 1. count was 0 previously. Now

count = 1

Next the program moves to the next character of word hello which is l. This time the if condition evaluates to true because the character l matches with string2. So count is again incremented to 1. count = 2.

Next the program moves to the next character of word hello which is o. The if condition evaluates to false as o does not match with string2 i.e. l. So the count remains 2.

Next the first loop moves to the next word of the string1 = "world". The inner (second) for loop iterates through each character of "world" from "w" to "d" and checks if any character is equal to string2. Only one character is equal to string2 in "world". So count is incremented to 1. Hence count = 3

After the loop ends the statement return count returns the number of times string2 occurs in the string1. So the output is:

l occurs 3 times in hello world  

8 0
3 years ago
Compute the sum of all integers that are multiples of 9, from 1 to 250. Enter your result of your computation in the text box be
shepuryov [24]

The pseudocode to find the sum of all integers that are multiples of 9, from 1 to 250.

totalSum = 0

for i from 1 to 250{

     if i is divided by 9 and remainder is 0{

           totalSum  = totalSum + i;

     }

}

print(totalSum)


in python language the code will be

totalSum = 0

for i in range(1,250):

    if i%9==0:

       totalSum += i



If you will run the program , the answer would be 3402.

8 0
3 years ago
Read 2 more answers
In short and brave what is technology?
emmainna [20.7K]

Answer:

technology is a whole means to provide goods needed for the survival and comfort of human life

8 0
3 years ago
Read 2 more answers
Other questions:
  • 7 features of QBASIC
    6·1 answer
  • In the file MajorSalary, data have been collected from 111 College of Business graduates on their monthly starting salaries. The
    15·1 answer
  • Types of operating systems
    5·2 answers
  • You recently discovered that Marketing1 can connect to Admin1, and Admin1 can connect to Marketing1, but neither of these comput
    11·1 answer
  • To create a cover letter to send to potential employers along with a resume, what software program should you use ?
    6·2 answers
  • In Python, arrays are usually reserved for
    12·1 answer
  • Leonardo is having difficulty accessing the course website. he should contact the for assistance. (points:1)
    13·1 answer
  • E-mail has made it very easy to send a message to more than one person at any time of day from just about anywhere. If you wante
    12·2 answers
  • Wireless data networks are particularly susceptible to known ciphertext attacks.
    10·1 answer
  • Hey everyone. I am so bored
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!