Learn practical skills, build real-world projects, and advance your career
!pip install jovian --upgrade --quiet
import jovian

Question 1: The user will enter a list of numbers and a separate number. The program will display the index at which the number is present in the list. If the number is absent, it'll return -1. Do NOT use built-in functions for searching.

a=input("Entet the numbers ")
b=a.split()
for i in range(0,len(b)):
    b[i]=int(b[i])
print(b)
num=int(input("Enter the number you want to find  "))
if num in b:
			print(b.index(num))
else:
	print(-1)
Entet the numbers 6 7 8 9 10 [6, 7, 8, 9, 10] Enter the number you want to find 6 0
a=input("Entet the numbers ")
b=a.split()
for i in range(0,len(b)):
    b[i]=int(b[i])
print(b)
num=int(input("Enter the number you want to find  "))
if num in b:
			print(b.index(num))
else:
	print(-1)
Entet the numbers 6 7 8 9 10 [6, 7, 8, 9, 10] Enter the number you want to find 4 -1