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]
3 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]3 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
Write the name of the tab, the command group, and the icon that you need to use to justify
Dafna11 [192]

Answer:

Tab: Home Tab

Command Group: Paragraph

Icon: Justify Icon

<em>The icon has no name; rather it is represented by 4 horizontal lines that are aligned on both edges</em>

<em />

Explanation:

To answer this question, I'll make use of the following attachment

<em>Where</em>

<em>1- represents the home tab</em>

<em>2 - represents the paragraph</em>

<em>3 - represents the justify icon</em>

<em />

3 0
4 years ago
Which word is most appropriate to describe a laptop?
Thepotemich [5.8K]
The best word to describe a laptop would be Portable
8 0
3 years ago
What is data and instructions entered into the memory of a device
lyudmila [28]

A POINTING DEVICE IS AN INPUT DEVICE THAT ALLOWS A USER TO CONTROL A POINTER ON THE SCREEN. ... A KEYBOARD IS AN INPUT DEVICE THAT CONTAINS KEYS USER TO ENTER DATA AND INSTRUCTIONS INTO A COMPUTER.                                                                            

SORRY FOR CAPS MY CAPS KEY GOT STUCK

3 0
4 years ago
In the previous activity the learner developed an idea for a game, this included the game plot, storyline, characters, interacti
Neko [114]

Answer:

I hope this helps, this is my first time doing an answer in Brainly.

Explanation:

The game concept will be this, your character, being a green lizard, will jump from platform to platform. Constantly scrolling up with the character, but if you fall behind, it's game over.

If I know anything about smartphones is the the screens are usually tiny, and are very hard to play on. So I will impliment motion controls. If you tilt the screen in the direction you want the lizard to go, it will follow that tilt.

The pros is that it's a lot more easy when developing the game, the cons is that the games are usually super small.

3 0
3 years ago
Flowchart is written using english language.<br>true or false​
DedPeter [7]

the answer is true hope it helps

7 0
3 years ago
Read 2 more answers
Other questions:
  • Describe the difference between gui and cli​
    9·1 answer
  • How many packets does your computer send/receive in a single mouse click when you visit a website?
    6·1 answer
  • âthe first line in a hypertext markup language (html) file is the _____, which is a processing instruction indicating the markup
    9·2 answers
  • Match the items with their respective descriptions. denotes row numbers denotes cell addresses denotes worksheets denotes column
    10·1 answer
  • A ____ may be composed of a few individual objects or several complex groups of objects.
    9·1 answer
  • If you are working with a team of students on a class project and your team chooses to share content by uploading Word and Excel
    13·1 answer
  • Select the parts of a business letter.
    6·2 answers
  • What is the most used piece of technology in education?
    13·1 answer
  • What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using binary se
    13·1 answer
  • Give two examples of situations or appliance where electrical circuits are used​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!