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
TEA [102]
3 years ago
11

The groups_per_user function receives a dictionary, which contains group names with the list of users. Users can belong to multi

ple groups. Fill in the blanks to return a dictionary with the users as keys and a list of their groups as values.
def groups_per_user(group_dictionary):
user_groups = {}
# Go through group_dictionary
for ___:
# Now go through the users in the group
for ___: # Now add the group to the the list of
# groups for this user, creating the entry
# in the dictionary if necessary
return(user_groups)
print(groups_per_user({"local": ["admin", "userA"],
"public": ["admin", "userB"],
"administrator": ["admin"] }))
Computers and Technology
1 answer:
Akimi4 [234]3 years ago
3 0

The groups_per_user function receives a dictionary, which contains group names with the list of users.

Explanation:

The blanks to return a dictionary with the users as keys and a list of their groups as values is shown below :

def groups_per_user(group_dictionary):

   user_groups = {}

   # Go through group_dictionary

   for group,users in group_dictionary.items():

       # Now go through the users in the group

       for user in users:

       # Now add the group to the the list of

         # groups for this user, creating the entry

         # in the dictionary if necessary

         user_groups[user] = user_groups.get(user,[]) + [group]

   return(user_groups)

print(groups_per_user({"local": ["admin", "userA"],

       "public":  ["admin", "userB"],

       "administrator": ["admin"] }))

You might be interested in
What are the things that a computer literate understands?Name thems.​
vitfil [10]

Answer:

•Determine your IP address.

•Verify physical connectivity to the network.

•Check that you have a logical connection to the network.

•Find out what path network traffic takes to get to its destination.

Translate from DNS names to IP addresses.

4 0
2 years ago
Which would take more storage space, a layer file showing all the us counties or a layer file showing all the us states?
Ksju [112]
All counties. Much more info. Although most layers are just excel files with geographical reference data in them. That one file may be several MB as the state file may be 1mb or less
5 0
3 years ago
This network passes data most of the time, but sometimes for reasons unknown to the junior network engineer in charge of monitor
Kaylis [27]

Answer:

The characteristic that is violated is Availability.

Explanation:

  • The network is passing data at mostly, it means performance is good. Junior network engineer is doing his job well then there is minimum chance of network failure or lack of manageability.
  • The scalability; range of computing capabilties can be managed by the engineer.
  • However, sometimes the core router might get crashed due to unavailability of the network that is not under the control of the engineer.

8 0
3 years ago
Piers wants to take a course on XML. He is a certified web designer,but he has not used XML before. How can he use XML to improv
Agata [3.3K]

Answer:

It will bring more verstality in his website. He will be able to define tags.

Explanation:

XML allows to define your own tags. You can bring semantics into your website which make data browsing easier.

3 0
3 years ago
What are the set of rules to move data from one computer to another?
ss7ja [257]
I don't believe that there are rules.
Hope I helped,
 Ms. Weasley
4 0
3 years ago
Other questions:
  • In this exercise we examine in detail how an instruction is executed in a single-cycle datapath. Problems in this exercise refer
    6·1 answer
  • A _____ is a link on a web page that leads to another web page.
    13·1 answer
  • Write a method that take an integer array as a parameter and returns the sum of positive odd numbers and sum of positive even nu
    13·1 answer
  • Discuss advantages and disadvantages of Twisted Pair?
    6·1 answer
  • TCP is the protocol responsible for the delivery of data on the Internet, and IP provides addresses and routing information.
    12·1 answer
  • ( Game Design) The companies who get video games out to consumers are called:
    12·1 answer
  • D. What is the work of the following features:<br>1. Foot note​
    10·1 answer
  • How can you say that a painting is real? ​
    7·2 answers
  • Fifteen years ago, everyone didn't have a cell phone. Anyone developing an app would not have found many users. Today, the exist
    12·1 answer
  • imagine that you are explaining the art of visual comparison to a group of photography students. You are mentoring. What do you
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!