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
algol [13]
3 years ago
15

Given an array of users, write a function, namesAndRoles that returns all of user's names and roles in a string with each value

labeled.For example: const users = [ { name: 'Homer', role: 'Clerk', dob: '12/02/1988', admin: false },{ name: 'Lisa', role: 'Staff', dob: '01/30/1965', admin: false },{ name: 'Marge', role: 'Associate', dob: '09/10/1980', admin: true } ] namesAndRoles(users) // Name: Homer // Role: Clerk // Name: Lisa // Role: Staff // Name: Marge // Role: Associatefunction namesAndRoles(users) { return users } namesAndRoles(users)
Computers and Technology
1 answer:
LenaWriter [7]3 years ago
3 0

Answer:

def namesAndRoles(users):

   for user in users:

       return f"{user[name]}, {user[role]}"

Explanation:

The python program gets the list of dictionaries of the users in a company and returns the user names and their roles. The code is defined as a function and is executed when the function is called.

You might be interested in
Marie can now edit her photos, send them in emails, print them on a printer, and use them as wallpaper on her computer. This is
AVprozaik [17]

I could be wrong, but I believe this one would be JPG files.

4 0
4 years ago
Read 2 more answers
Explain why the cosmic horizon is much smaller than the universe itself
sashaice [31]
The cosmic horizon is what your eye allows you to see, and that is only a small fragment of the universes actual size
3 0
3 years ago
Your boss asks you to transmit a small file that includes sensitive personnel data to a server on the network. the server is run
polet [3.4K]
If an attacker can see transmitted packets, they will be able to see login credentials and be able to log in to the server. Additionally, the sensitive data in the file will be visible to the attacker. A better way would be to transfer the file using sftp or tftp.
4 0
3 years ago
One difference between multi-tasking using fork() versus using threads is that there is race condition among threads due to shar
MAXImum [283]

Answer:

vnn

Explanation:

7 0
3 years ago
Read 2 more answers
When should you integrate technology?​
earnstyle [38]
Nolur acil lütfen yalvarırım yalvarırım lütfen yalvarırım when should you integrate technology?
5 0
3 years ago
Read 2 more answers
Other questions:
  • What three characteristics of a function are described in an IPO chart? What is performed at each characteristic?
    12·1 answer
  • 1. Think about the various ways in which you have seen hackers portrayed in popular media over the past few years. Are they hero
    11·1 answer
  • Explain the difference between the term graphic communication and printing
    7·1 answer
  • Write a dialogue between two friends who are debating on popularity or property​
    6·1 answer
  • With only a floor plan to reference, the designer would know what about a window?
    7·1 answer
  • Which of the following apply to the definition of Wide Area Networks? Check all of the boxes that apply.
    7·2 answers
  • __________ is a contemporary term for data and software tools for organizing, analyzing, and providing access to data to help ma
    6·1 answer
  • Jacob has a text file open, and he is typing on the keyboard. What is the best description of how the
    8·1 answer
  • 15. It is the process of capturing data or translating information to recording format
    12·1 answer
  • True or False: Cookies placed on a visitor's browser can include enough information to instruct an ad network which types of pro
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!