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
tangare [24]
3 years ago
7

Write a function called is_present that takes in two parameters: an integer and a list of integers (NOTE that the first paramete

r should be the integer and the second parameter should be the list) and returns True if the integer is present in the list and returns False if the integer is not present in the list. You can pick everything about the parameter name and how you write the body of the function, but it must be called is_present. The code challenge will call your is_present function with many inputs and check that it behaves correctly on all of them. The code to read in the inputs from the user and to print the output is already written in the backend. Your task is to only write the is_present function.
Computers and Technology
1 answer:
Agata [3.3K]3 years ago
7 0

Answer:

The function in python is as follows

def is_present(num,list):

    stat = False

    if num in list:

         stat = True

       

    return bool(stat)

Explanation:

This defines the function

def is_present(num,list):

This initializes a boolean variable to false

    stat = False

If the integer number is present in the list

    if num in list:

This boolean variable is updated to true

         stat = True

This returns true or false        

    return bool(stat)

You might be interested in
When are the malls going to open
Amiraneli [1.4K]
Idk maybe at 6:00pm today cuz most of the malls are close. Happy Thanksgiving! :D
3 0
2 years ago
Read 2 more answers
Jenna received an interesting email about dolphins that she wants to share with her brother. Which operation will allow Jenna to
KATRIN_1 [288]
The answer is Forward

5 0
2 years ago
Which statement is true about the filtering technique? A. You cannot apply multiple filters. B. You cannot remove a filter once
Naily [24]

Answer:

<u>C. You cannot unhide rows by removing filters</u> is the correct statement about filtering technique.

Explanation:

We can apply multiple filters for rows or columns. If we would like to view the data satisfying multiple filters, this option can be used.

Once a filter is applied, it can be removed or added again. The hidden rows or columns will be visible once all the filters are removed. By building a selection list of all the rows that should not be visible, we can hide the rows by removing filters.  

Filters can be applied to any row or column.

5 0
3 years ago
Different types of names given to explicit convertion in java<br>​
melamori03 [73]

Answer:

Different types of name given to explicit conversation in java are

1. Automatic

2. Explicit

3 0
3 years ago
What does ADSL stand for?
vladimir1956 [14]
Asymmetric digital subscriber line (ADSL)
3 0
3 years ago
Read 2 more answers
Other questions:
  • An excel file called “student_gpa” is opened. What does the funnel next to “GPA” indicate
    5·1 answer
  •                                                        HELP PLEASE 
    12·2 answers
  • What is a stereo type?
    14·2 answers
  • 3.
    5·1 answer
  • Help me find the difference between these logos
    10·2 answers
  • A small but growing advertising business hires a new secretary. Until now, the computers have been directly connected, and all t
    12·1 answer
  • Life without internet points
    7·2 answers
  • Golf scores record the number of strokes used to get the ball in the hole. The expected number of strokes varies from hole to ho
    5·1 answer
  • Which of the following is the best description of an ip address?
    8·1 answer
  • In ____ orientation, a page is taller than it is wide.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!