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
vlabodo [156]
2 years ago
6

Write a function where you are given: a list of numbers "nums", a number to search for "num". Return the index of "num" in the l

ist "nums". If "num" is not found in the list, return -1 instead.
Computers and Technology
1 answer:
ASHA 777 [7]2 years ago
6 0

The program is an illustration of functions; functions are used to represent collection of named statements

<h3>The program in Python</h3>

The function in Python where comments are used to explain each line is as follows:

#This defines the function

def checkList(nums,num):

   #This checks if num exists in nums

   if num in nums:

       #If yes, this returns the index of num

       return nums.index(num)

   #If otherwise, this returns -1

   return -1

Read more about Python programs at:

brainly.com/question/26497128

#SPJ1

You might be interested in
_____ consists of computer equipment used to perform input, processing, and output activities.
goldfiish [28.3K]
<span> (keyboards, mice, scanning, computer chips)</span>
6 0
3 years ago
kara, darrell and jose all enjoy watching comedies online. kara and jose also enjoy watching dramas. using content-based filteri
vitfil [10]

Answer:

thrillers?

Explanation:

my best estimation would most likely be a thriller...

4 0
3 years ago
Emma won a laptop at her high school science fair. The laptop does not have antivirus software installed on it so Emma must purc
patriot [66]

if the question is if she should..

Explanation:

Yes, she should if she plans to  use it for a couple years she should get the best anti virus software :)

3 0
3 years ago
Font issues arise when you attempt to run a presentation on a computer that does not have the fonts you used when creating the p
jenyasd209 [6]

Some computers have fonts that differ from one another – it could be because the user downloaded a different font styles from the various sources available from the Internet; it could also be because the user is creating his or her presentation in a computer with different operating systems.

In order to mitigate any error that might occur in the font style due to these circumstances, you should embed the font to the presentation while creating it. This ensures that the same font displays across all system.

3 0
3 years ago
Typically, at the completion of a device I/O, a single interrupt is raised and appropriately handled by the host processor. In c
inessss [21]
No idea sorrrrrrryyyyyyyy
5 0
3 years ago
Other questions:
  • What type of Windows Server is the most likely server to be targeted by a computer hacker?
    13·2 answers
  • A(n) _________________________ conveys a visual representation of data.
    6·1 answer
  • In order to use SliIn order to use Slicers to filter some data, what must you first do to that data?cers to filter some data, wh
    6·1 answer
  • A computer program that senses when another computer is attempting to scan or access a computer or network is called an
    7·1 answer
  • For selection purposes, it is critical that application items have a proven relationship between a selection device and some rel
    5·1 answer
  • In terms of system thinking, what is process?
    15·2 answers
  • Your team will write a function that reverses a C-string, to practice using pointers. You must use pointers and C-strings for th
    6·1 answer
  • An algorithm that could execute for an unknown amount of time because it depends on random numbers to exit a function may:______
    13·1 answer
  • What is the value of numX when this program is executed? if 3 &lt; 5 and 8 != 3: numX = 3 else: numX = 7
    13·2 answers
  • There are several design goals in building an operating system; for example, resource utilization, timeliness, robustness and so
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!