Respuesta :
Answer: Here you go, change it however you like :)
Explanation:
v = [24, 20, 29, 32, 34, 29, 49, 46, 39, 23, 42, 24, 38]
usr = int(input("Enter number: "))
print(f"Index: {v.index(usr)}") if usr in v else print(-1)
The program which prints the index value of an enters number is written thus in python 3 ;
v = [24, 20, 29, 32, 34, 29, 49, 46, 39, 23, 42, 24, 38]
#list of values
num = int(input())
#prompts user to enter a value
a = [v.index(num) if num in v else -1]
#checks if number Is in array an stores the index in variable a else it stores - 1
print(a)
#display the value of a
A sample run of the program is attached
Learn more :https://brainly.com/question/22841107
