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
Naya [18.7K]
3 years ago
5

Selector

Computers and Technology
1 answer:
ASHA 777 [7]3 years ago
4 0

Answer:

See explaination

Explanation:

# Import required the module.

import random

# Define a function selector() which accepts the

# input_list, check_list, and return_list and

# returns a string named output.

def selector(input_list,check_list,return_list):

# Assign None to string variable output.

output=None

# Use for loop to traverse through input_list.

for i in range(len(input_list)):

# Check if element of an input_list is present

# in check_list.

if input_list[i] in check_list:

# Assign a random value from return_list

# to output.

output=random.choice(return_list)

# break out of the loop if input_list

# element is present in check_list.

break

#

return output

# Use assert statement to test a condition.

# If the condition is true, then program continues to

# execute, otherwise raises an AssertionError.

assert callable(selector)

assert selector(['is','in','of'],['of'], ['Yes']) == 'Yes'

assert selector(['is','in'],['of'], ['Yes','No']) == None

# Display the output.

print(selector(['is','in','of'],['of'], ['Yes']))

print(selector(['is','in'],['of'], ['Yes','No']))

You might be interested in
What data type would you use for a decimal number?* ​
Elan Coil [88]

Answer:

numeric

Explanation:

The decimal data type is an exact numeric data type defined by its precision (total number of digits) and scale (number of digits to the right of the decimal point).

I hope this answers your question.

3 0
3 years ago
Which task can be completed with the Template Organizer?
spin [16.1K]

Answer:

B is the answer

Explanation:

i just got it right

8 0
3 years ago
Read 2 more answers
In the Business world people are often measured by their???
aleksandr82 [10.1K]

Answer: D technical skills

8 0
3 years ago
When performing forensics on an Apple computer, what operating system are you the most likely to encounter QUIZLET
lidiya [134]

When performing forensics on an Apple computer, the operating system are you the most likely to encounter is iOS.

<h3>What is operating system forensics?</h3>

A Operating System Forensics is known to be a method used for the retrieving of any useful information from the Operating System (OS) of the computer or any kind of mobile device.

Note that the reasons for collecting this information is so as to get all the empirical evidence against any kind of perpetrator.

Learn more about operating system from

brainly.com/question/1763761

3 0
2 years ago
What is an advantage of unicode over ascii?
tamaranim1 [39]
Unicode is a 16 bit system which can support 65636 different characters which is much more than the number of characters that ASCII code support.
7 0
3 years ago
Other questions:
  • A ____ document identifies the purpose of the program being developed, the application title, the procedures to be followed when
    11·1 answer
  • Which of the following are valid values for a boolean value in programming? (Select all that apply)
    8·1 answer
  • 1- How should an operating system support communication between applications? explain your reasoning?
    10·1 answer
  • ________ is the process the compiler uses to divide your source code into meaningful portions; the message means that the compil
    7·1 answer
  • 2 ways to make your computer work faster ( please help asap )
    6·1 answer
  • The command to get out of the loop.<br>a.<br>i exit<br>ii. break<br>iii. comment<br>iv. for​
    12·1 answer
  • Cual es la fiabilidad de la innovacion tecnologica
    15·1 answer
  • Explain the difference between overexposed vs. underexposed images?
    15·2 answers
  • Select the correct answer.
    5·2 answers
  • 4. Ernesto works in a small office with five other people. What are two possible connection
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!