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.
no_elements1=int(input("Enter number of elements in the list "))
Enter number of elements in the list 5
user_list1=[]
for i in range(no_elements1):
num=int(input("Enter the "+str(i+1)+"th number "))
user_list1.append(num)
Enter the 1th number 1
Enter the 2th number 3
Enter the 3th number 5
Enter the 4th number 7
Enter the 5th number 9