Learn practical skills, build real-world projects, and advance your career
Updated 3 years ago
!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.
n=list(input("enter a list of numbers(without any , or space):"))
num=input("enter the number:")
if num in n:
b=len(n)
for m in range(0,b):
if num==n[m]:
print("index of the number in the given list is ",m)
else:
print("this number is not in the list")