Home > other >  Introduction to Python
Introduction to Python

Time:09-22

And how to use the for a while find more than a number of prime Numbers in the first place

CodePudding user response:

I wrote a small program is also a beginner, and see if it meet your requirements, many communication

The import OS
Def is_index (a) :
Mark=0
For I in range (2 a) :

If the int (a)==int (a/I) * I:
Mark=1
Return mark

I=input (" both Please enter the initial number: ")
I=int (I)
I=I + 1
While is_index (I)==1:
I=I + 1
print(i)

CodePudding user response:

 
The import OS
Def is_index (a) :
Mark=0
For I in range (2 a) :

If the int (a)==int (a/I) * I:
Mark=1
Return mark

I=input (" both Please enter the initial number: ")
I=int (I)
I=I + 1
While is_index (I)==1:
I=I + 1
Print (I)

  • Related