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
kakasveta [241]
2 years ago
14

In _________, the process requests permission to access and modify variables shared with others. a) entry section b) critical se

ction c) exit section
Computers and Technology
1 answer:
kumpel [21]2 years ago
7 0
In critical section, the process requests permission to access and modify variables shared with other
You might be interested in
Define the body of the function read_data(filename). If filename is None, return the sentence (already defined for your), otherw
Morgarella [4.7K]

Answer:

Answer explained

Explanation:

The main difference between parse_text_into_words( v1 and v2) is I have used splitlines also in v1 so the escape sequence '\n' will not be present in the list of words. while in v2 only split function is used so it will have '\n' present in words list.

Code:

def read_file(fileName = None):

  try:

      File = open(fileName,"r") # opening file in read mode

      for row in File:          # for each line in File

          print(row,end="")

  except IOError:      # handling exception of file opening

      print("Could not read file:",fileName)

def parse_text_into_words_v1(text):

  list_words = []

  list_lines = text.splitlines()

  for i in list_lines:

      list_words.extend(i.split(' '))

  return list_words

def parse_text_into_words_v2(text):

  list_words = []

  list_words.extend(text.split(' '))

  return list_words

def determine_difference(a_list,b_list):

  print("first list:",a_list)

  print("second list:",b_list)

  a_set = set(a_list)

  b_set = set(b_list)

  diff = a_set - b_set

  diff = list(diff)

  print("\nDifference between 2 sets: ",diff)

if __name__ == '__main__':

  print("Reading file using function read_file() to read \"data.txt\" :")

  read_file("data.txt")

  print("\n\n")

  t = '''vhfhyh ghgggj ghchvjhvj'''

  print("\nDemonstrating implementation of parse_text_into_words_v1:")

  l = parse_text_into_words_v1(t) # calling function with text parameter

  print("list of words:")

  print(l)

  print("\nDemonstrating implementation of parse_text_into_words_v2:")

  b = parse_text_into_words_v2(t) # calling function with text parameter

  print("list of words:")

  print(b)

  print("\nDemonstrating difference between two lists")

  a_list = [1,2,3,4,5,6,7,8,9,10]

  b_list = [2,4,6,8,10]

  determine_difference(a_list,b_list) # passing two list to take difference

8 0
3 years ago
How do you know that the computer is infected by virus​
Olegator [25]
  1. Slow computer performance (taking a long time to start up or open programs)
  2. Problems shutting down or restarting.
  3. Missing files.
  4. Frequent system crashes and/or error messages.
  5. Unexpected pop-up windows.
6 0
2 years ago
A team of researchers wants to create a program to analyze the amount of pollution reported in roughly 3,000 counties across the
omeli [17]

The option that is most likely to be a challenge in creating the program is Different counties may organize data in different ways.

<h3>What is Pollution?</h3>

Pollution is known to be a kind of bringing in of harmful materials into an environment.

These harmful things are known as pollutants. Pollutants are known to be natural and artificial that is they are created by human activity, such as trash or runoff produced by factories, etc.

Learn more program from

brainly.com/question/1538272

7 0
2 years ago
Which of the following is the fastest growing input technique​
Natali [406]
We need more information for this one, please.
8 0
3 years ago
Globalization is the trend A) of the world economy becoming a less dependent system. B) of the world economy toward becoming a m
mojhsa [17]

Answer:

B) of the world economy toward becoming a more interdependent system.

Explanation:

Globalization refers to the process of international trade which brings people, companies together for the sole aim of exchanging goods, services, capital, knowledge across international borders.

This process of interaction makes people to get closer and increase international cooperation.

4 0
3 years ago
Other questions:
  • Explain Organizational approach to System Analysis and Design
    11·1 answer
  • What benefit does internet have​
    11·1 answer
  • What is the correct posting of the journalized transaction shown in figure 3.03 to the accounts payable subsidiary ledger?
    9·1 answer
  • The ________ file system supports a maximum file size of 2gb
    12·1 answer
  • Riodic Table
    6·1 answer
  • A simulation model includes: a. a description of the components of the system. b. a simulation clock. c. a definition of the sta
    8·1 answer
  • What allows you to navigate up, down, left and right in a spreadsheet?
    12·1 answer
  • Mrs. Zoo gave out the rubric for our essay. She stated that our essay should be complete by Friday of that week. I didn't have t
    13·1 answer
  • 4. Word Separator:Write a program that accepts as input a sentence in which all of thewords are run together but the first chara
    10·1 answer
  • Define print_shape() to print the below shape. Example output:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!