This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
n = int(input("Numérateur ")) | |
d = int(input("Dénominateur ")) | |
m = max([n,d]) | |
for x in range(m,0,-1): | |
if n%x == 0 and d%x == 0 : | |
print("= (%s*%s) / (%s*%s)" %(int(n/x),int(x),int(d/x),int(x))) | |
print("= %s/%s" %(int(n/x),int(d/x))) | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import random | |
x = 0 | |
print("Quelle table veux-tu reviser ?") | |
t = int(input()) | |
print ("C'est parti.") | |
for i in range(10): | |
h = int(random.randint(0,9)) | |
vr = t*h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from tkinter import* | |
tk = Tk() | |
tk.resizable(0, 0) | |
tk.title('Distance-Temps-Vitesse') | |
def distance(): | |
canvas.delete("all") | |
def valider(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
iterations = int(input("Combien d'itérations ? ")) | |
longueur = int(input("Quelle longueur veux-tu pour un trait ? ")) | |
liste=["c"] | |
for i in range(iterations): | |
nouvelle_liste=[] | |
for pliage in range(0,len(liste)): | |
if pliage%2==0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import random | |
Vbs_anglais = {'be': 'was/were, been', 'beat': 'beat, beaten', 'become': 'became, become', 'begin': 'began, begun', 'bet': 'bet, bet', 'bite': 'bit, bitten', 'bleed': 'bled, bled', 'blow': 'blew, blown', 'break': 'broke, broken', 'bring': 'brought, brought', 'build': 'built, built', 'burn': 'burnt, burnt', 'burst': 'burst, burst', 'buy': 'bought, bought', 'catch': 'caught, caught', 'choose': 'chose, chosen', 'come': 'came, come', 'cost': 'cost, cost', 'cut': 'cut, cut', 'do': 'did, done', 'draw': 'drew, drawn', 'drink': 'drank, drunk', 'drive': 'drove, driven', 'eat': 'ate, eaten', 'fall': 'fell, fallen', 'feed': 'fed, fed', 'feel': 'felt, felt', 'fight': 'fought, fought', 'find': 'found, found', 'fly': 'flew, flown', 'forget': 'forgot, forgotten', 'freeze': 'froze, frozen', 'get': 'got, got', 'give': 'gave, given', 'go': 'went, gone', 'grow': 'grew, grown', 'have': 'had, had', 'hear': 'heard, heard', 'hide': 'hid, hidden', 'hit': 'hit, hit', 'hold': 'held, held', 'hurt': 'hurt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
iterations = int(input("Combien d'itérations ? ")) | |
longueur = int(input("Quelle longueur veux-tu pour un trait ? ")) | |
liste = ["m","m","m"] | |
for i in range(iterations): | |
nouvelle_liste = [] | |
for creation in liste: | |
nouvelle_liste += [creation,"c","m","c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def effectif(serie): | |
return len(serie) | |
def mediane(serie): | |
serie.sort() | |
return (serie[math.floor((len(serie)-1)/2)]+serie[math.ceil((len(serie)-1)/2)])/2 | |
def etendue(serie): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
import turtle | |
iterations = int(input("Combien d'itérations ? ")) | |
def fib(n): | |
l = [1,1] | |
for f in range(n-2): | |
l.append(l[-1]+l[-2]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def crible_eratosthene(n_max): | |
liste = list(range(1, n_max+1)) | |
for table in range(2, int(math.sqrt(n_max))+1): | |
if liste[table-1]!=0: | |
for n in range(2*table, n_max+1, table): | |
liste[n-1]=0 | |
return [i for i in liste if i!=0 and i!=1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from turtle import * | |
from time import * | |
class aiguille: | |
def __init__(self, quelle, epaisseur, taille): | |
self.tortue = Pen() | |
self.taille = taille | |
self.epaisseur = epaisseur | |
self.valeur_temps = {'h':3, 'm':4, 's':5}[quelle] | |
self.denominateur = {'h':12, 'm':60, 's':60}[quelle] |
OlderNewer