Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to check nth prime in python

x=int(input())
n,c=1,0
while(c<x):
    n+=1
    for i in range(2,n+1):
        if(n%i==0):
            break
    if(i==n):
        c=c+1
print(n)
Comment

PREVIOUS NEXT
Code Example
Python :: pandas apply pass in arguments 
Python :: how to find most repeated word in a string in python 
Python :: find the first occurrence of item in a list in python 
Python :: detect keypress in python 
Python :: pandas remove column 
Python :: get title attribute beautiful soup 
Python :: how to check django rest framework version 
Python :: how to check if a letter is lowercase in python 
Python :: selenium python class contains 
Python :: python remove background 
Python :: how to write a file in python 
Python :: Substring in a django template? 
Python :: How do I get the parent directory in Python? 
Python :: apostrophe in python 
Python :: assigning values in python 
Python :: django drop database postgres 
Python :: python fill 0 
Python :: getting the file path of a file object in python 
Python :: pathlib path exists 
Python :: python get element from list 
Python :: try except python 
Python :: how to detect language python 
Python :: run python file using python code 
Python :: Simple way to measure cell execution time in jupyter notebook 
Python :: how to take input from user in python 
Python :: python cut string after character 
Python :: merge dictionaries in python 
Python :: python unicode is not defined 
Python :: import sklearn.metrics from plot_confusion_matrix 
Python :: create close python program in puthon 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =