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
Which explanation best explains the importance of using encryption?
andrezito [222]

Answer:

can you pls type the answer choices in the comments

5 0
2 years ago
What cloud application offers a variety of cloud services, including automation and crm, cloud application development, and web
Lady bird [3.3K]
<span>The cloud is a place where you can access apps and services, and where your data can be stored securely.
</span><span>The cloud computing appeared at the end of the 1990s.
</span>Salesforce.com, Inc is a cl<span>oud application that offers a variety of cloud services, including automation and crm, cloud application development, and web site marketing</span>It is an American cloud computing<span> company headquartered in San Francisco.</span>
5 0
3 years ago
When we have signals within 1-2 MHz band, using a waveguide is the most preferred choice for a transmission line. T or F?​
Maksim231197 [3]

Answer:

T

Explanation:

6 0
3 years ago
Recall that in C++ there is no check on an array index out of bounds. However, during program execution, an array index out of b
aev [14]

Answer:

b b hhhhh sssss this i scool i just want the points and not to help people i just im using this

Explanation:

im joking idk the answer im so sorry to bother you

4 0
3 years ago
10.( 5) Given the two relations X and Y with relation X has a columns and b rows while relation Y has c columns and d rows then
Vikki [24]

Answer:I DONT KNW THE AWNSER I NEED SOME MONEY SO YA

Explanation:

7 0
3 years ago
Other questions:
  • Submit your 300-word essay describing the equipment usedI in a well-equipped studio’s audio department and the training and expe
    8·2 answers
  • H&amp;R Block's stated purpose is: to be the leading global consumer tax company bringing tax and related solutions to clients y
    15·1 answer
  • 4.3 Code Practice<br> edhisve
    13·1 answer
  • Which group on the home ribbon contains commands to control the alignment of text in a document?
    15·1 answer
  • You want to receive alerts if unusual activity is detected relating to the Web servers deployed in your perimeter network. What
    7·1 answer
  • 1. Who was able to complete the puzzle the fastest in Trial 1?
    15·1 answer
  • Trish has bought a new computer that she plans to start on after a week
    5·1 answer
  • What is the depth of the following tree?
    10·1 answer
  • Excel creates which type of cell references in formulas by default?
    5·1 answer
  • What is the most appropriate data type for each of these items?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!