You code doesn't try to find prime numbers: it lacks a primality test and the like.
Try
import math
def is_prime(primes_list, n):
limit = math.ceil(math.sqrt(n))
i = 0
while primes_list[i] <= limit:
if n % primes_list[i] == 0:
return False
i += 1
return True
def primes(n):
primes_list =[2,3,5]
if n < 0:
return []
if n < 4:
return primes_list[0 : n]
c = 7
while len(primes_list) < n:
if is_prime(primes_list, c):
primes_list.append(c)
c += 2
return primes_list
pl = primes(100)
index = int(input("Enter a positional value to find the corresponding prime:"))
if index < 100:
print(pl[index])