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
9

Finish the code to search for a 7 in the array.

Computers and Technology
1 answer:
guapka [62]3 years ago
8 0

Answer:

The complete code is as follows:

from array import *

myArr = array('f',[3, 5, 7,3, 10])

location = myArr.index(7)

print(str("7")+" is at position "+str(location+1))

Explanation:

I made corrections to the third line of the code and I added a line

This line gets the index of 7 from the array myArr using the index keyword

location = myArr.index(7)

This line prints the position of the 7 in the array

print(str("7")+" is at position "+str(location+1))

You might be interested in
How many base cases are in the functionabove?
baherus [9]

Answer:

The answer is (b). 1.

Explanation:

In the code there is only 1 base case .

the base case is as following:-

if(n==0)

return 0;

this is the base case.

Base case is the most important statement in the function that uses recursion because without base case the recursion calls will keep on going and we will get a run time error.

5 0
3 years ago
What is computer ?how does it work​
Lorico [155]

Answer:

A computer is an electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program. It receives data through an input unit based on the instructions it is given and after it processes the data, it sends it back through an output device.

Explanation:

5 0
4 years ago
Read 2 more answers
You want to draw a rectangle over the moon you added to your slide and then move it behind the moon. You want it to look like a
Ray Of Light [21]
I choose Home and it’s a good thing to have
5 0
3 years ago
What is the difference between RELIABLE and UNRELIABLE sources of<br> income?
andrezito [222]
Reliable income is something you can “rely” on, or income you will always receive.

Unreliable income is something you can’t always rely on because you might not be able to access it forever.
4 0
3 years ago
Read 2 more answers
HELP ASAP. Which of the following best describes the path of a network packet on the Internet? I think it's (A)
lesya692 [45]

Answer:

the 1st one

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Describe the components of series-parallel circuit
    14·1 answer
  • Each​ _____ in a relational database table is a unique record of something that users want to track.
    14·1 answer
  • When should you update your Transaction Register? Every time you make a transaction Daily Weekly Monthly
    6·1 answer
  • How do particles move at higher temperatures compared to how they move at lower temperatures?
    10·1 answer
  • Write a statement that defines an ifstream object named inputFile and opens a file named "Friends.txt".
    13·1 answer
  • Which option is used to apply formatting to multiple objects on a single slide while still maintaining the ability to manage the
    14·2 answers
  • Methods inherited from the base/super class can be overridden. This means changing their implementation; the original source cod
    5·1 answer
  • one_diff(a?): Description: Determine if there is exactly one character different between exactly two strings. Parameters: Determ
    5·1 answer
  • HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP!!!
    12·1 answer
  • If any one has mincraft on ps4 bedrock we can finish building a BIG city world all we need to put is a shop and money dispensers
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!