subject

Please help as soon as possible please and thank you Write a program that uses the following initializer list to find if a random value entered by a user is part of that list.

Don't put a file down below cause I can't access it

v = [24, 20, 29, 32, 34, 29, 49, 46, 39, 23, 42, 24, 38]

The program should ask the user to enter a value. If the value is in the array, the program should print the index. If it is not in the array, the program should print -1.

Hint: The values in the list are integers, so you should also get the value from the user as an integer. We can assume the user will only enter integer values.

Sample Run

search for: 29

2

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 25.06.2019 07:00, awuekure
The graph shows the number of chapters sarah read in a book each day of a week
Answers: 1
image
Computers and Technology, 25.06.2019 12:30, xocupcake309174
In many applications, only a small percentage of the points in a given set p of n points are extreme. in such a case, the convex hull of p has less than n vertices. this can actually make our algorithm convexhull run faster than θ(nlogn). assume, for instance, that the expected number of extreme points in a random sample of p of size r is o(rα ), for some constant α < 1. (this is true when the set p has been created by picking points uniformly at random in a ball.) prove that under this condition, the running time of the algorithm is o(n).
Answers: 3
image
Computers and Technology, 25.06.2019 12:30, emily4984
In a paragraph of no less than 125 words, explain what netiquette is and how it improves efficiency and productivity in the workplace.
Answers: 1
image
Computers and Technology, 25.06.2019 13:30, cornpops4037
Landslides often accompany earthquakes and volcanoes and pose an additional threat to humans after these events. true false
Answers: 1
You know the right answer?
Please help as soon as possible please and thank you Write a program that uses the following initia...

Questions in other subjects: