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
Phantasy [73]
3 years ago
13

In an average case involving an array of n elements, how many times will a sequential search function have to read the array to

locate a specific value
Computers and Technology
1 answer:
Strike441 [17]3 years ago
3 0

Answer:

n/2 times

Explanation:

The number of times  a sequential search function will have to read the array in other to locate a specific value is : n/2 times

In an average case to locate a specific value using the a sequential/linear search the elements of the array will be searched in other to get a specific value and this will take n/2 number of attempts/times.

a sequential search is used to search for a value contained in a data set that has a linear relationship with other values contained in the data set

You might be interested in
Write a statement that adds 1 to the variable reverseDrivers if the variable speed is less than 0,adds 1 to the variable parkedD
Elina [12.6K]

Answer:

if speed < 0:

 reverseDrivers +=1

elif speed < 1:

 parkedDrivers +=1

elif speed < 40:

 slowDrivers +=1

elif speed<=65:

 safeDrivers +=1

else:

 speeder +=1

Explanation:

The statements are written in python programming language

See a complete code screenshot attached, where all the variables are defined

8 0
2 years ago
How can you solve real world mathematical problems using two linear equations in two variables​
ipn [44]

Answer:

import numpy as np

a = int(input ("Enter a"))

b = int(input ("Enter b"))

c = int(input ("Enter c"))

d = int(input ("Enter d"))

c1 = int(input ("Enter c1"))

c2 = int(input ("Enter c2"))

array1 =[[a, b],[c, d]]

A = np.array (array1)

B = np.array ([c1, c2])

X = np.linalg.inv (A).dot (B)

print (X)

Explanation:

let ax + by =c1

     cx + dy =c2

We have used the above NumPy library that has the methods for matrix calculation, and here we have used matrix multiplication, and the inverse of a matrix to find the value of x and y.

We know AX=B

X = inv A. B

And this we have used above. We can calculate inv A and do matrix multiplication using NumPy. And thus we get the above solution.

3 0
3 years ago
because of online writing, our audience: A. Compromise older people B. are bigger than before C. usually read less often D. are
lions [1.4K]
B. Are Bigger Than Before
8 0
3 years ago
Read 2 more answers
Write a Python program that prints your name, CS classes taken (or other relevant experience), and the date on separate lines. U
BigorU [14]

Answer:

The program in Python is as follows:

name = input("Name: ")

course = input("Course: ")

month = input("Month: ")

day = input("Day: ")

year = input("Year: ")

ddate = (month+"/"+day+"/"+year).replace(" ", "")

print("My name is ",name)

print("I have taken  ",course)

print("Today's date is ",ddate)

Explanation:

This line prompts user for name

name = input("Name: ")

This line prompts user for course classes taken

course = input("Course: ")

This line prompts user for month

month = input("Month: ")

This line prompts user for day

day = input("Day: ")

This line prompts user for year

year = input("Year: ")

This line calculates the date and remove all blank spaces

ddate = (month+"/"+day+"/"+year).replace(" ", "")

The next three lines print the user inputs

print("My name is ",name)

print("I have taken  ",course)

print("Today's date is ",ddate)

7 0
2 years ago
Spam and i report
defon

Answer:

option d is the correct answer

8 0
2 years ago
Read 2 more answers
Other questions:
  • Write the interface (.h file) of a class ContestResult containing: An data member winner of type string, initialized to the empt
    14·1 answer
  • ____ are systems in which queues of objects are waiting to be served by various servers
    5·1 answer
  • When using vlookup, the _____argument is optional?
    8·1 answer
  • (1) In Tamara's science class, the students are learning Which sentence shows an action that is extrinsically
    7·1 answer
  • What will be displayed as a result of executing the following code?
    5·1 answer
  • How do u type faster
    5·1 answer
  • A business letter is not written:
    6·1 answer
  • An application's certificate indicates the application -
    5·1 answer
  • ________ take advantage of vulnerabilities in software. Group of answer choices Blended threats Bots Trojan horses Direct-propag
    6·1 answer
  • Please help me on this match all this up i’ll give you brainlist
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!