Add files via upload

This commit is contained in:
Tanguy Herbron 2017-09-07 22:41:08 +02:00 committed by GitHub
parent 18cf473060
commit fa1d1dc4c7
3 changed files with 40 additions and 0 deletions

17
ENSIM/Functions.py Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/python
n = 0
def setup():
global n
n = 100
def loop():
global n
n = n + 1
if((n % 2) == 0):
print(n)
setup()
while True:
loop()

3
ENSIM/HelloWorld.py Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/python
print "Hello, world !";

20
ENSIM/Premiers.py Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/python
import math #Importer le module math pour la racine carree
#value = input("Jusqu'a quel nombre voulez-vous chercher un nombre premier ?")
value = 100000
tab = range(0, value)
for i in range(2, int(math.ceil(math.sqrt(value)))):
if tab[i] != -1:
for j in range(i+1, value):
if tab[j] > 1:
#print tab[i] % tab[j]
if tab[j] % tab[i] == 0:
tab[j] = -1
for i in range(0, value):
if tab[i] != -1:
print tab[i]