Learn practical skills, build real-world projects, and advance your career
!pip install jovian --upgrade --quiet
"Question 1"
'Question 1'
size_of_list=int(input('size of list:'))
a=[]
h=0
print("Enter",size_of_list,"terms")
for i in range(size_of_list):
    elements=int(input())
    a.append(elements)
print("now enter a seperate number")
sep_number=int(input())
for j in range(size_of_list):
    if a[j]==sep_number:
        print('the index of ',sep_number, 'is' ,j)
        h=h+j
if h==0:
    print("-1")
size of list:5 Enter 5 terms 3 4 5 6 7 now enter a seperate number 5 the index of 5 is 2
"Question 2"
'Question 2'