From 6a41a75ff2ef800508106a57479aa1c989228fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= Date: Wed, 3 Apr 2024 10:22:17 +0200 Subject: [PATCH] Remove DS from past year --- Fouche_Clement_EVAL/ex1.py | 24 ---------------------- Fouche_Clement_EVAL/ex2.py | 42 -------------------------------------- Fouche_Clement_EVAL/ex3.py | 38 ---------------------------------- 3 files changed, 104 deletions(-) delete mode 100644 Fouche_Clement_EVAL/ex1.py delete mode 100644 Fouche_Clement_EVAL/ex2.py delete mode 100644 Fouche_Clement_EVAL/ex3.py diff --git a/Fouche_Clement_EVAL/ex1.py b/Fouche_Clement_EVAL/ex1.py deleted file mode 100644 index 484fa11..0000000 --- a/Fouche_Clement_EVAL/ex1.py +++ /dev/null @@ -1,24 +0,0 @@ -def checkIfPrimeNumber(n): - if n % n == 0 & n % 1 == 0: - for i in range(2, n): - if n % i == 0: - return False - return True - else: - return False - -def circulaire(n): - toTest = [] - toTest.append(n) - for i in range(len(str(n)) - 1): - toTest.append(int(str(toTest[i])[-1] + str(toTest[i])[:-1])) - print(toTest) - for number in toTest: - if checkIfPrimeNumber(number) == False: - return False - return True - -if __name__ == '__main__': - print('719 est circulaire : ', circulaire(719)) - print('23 est circulaire : ', circulaire(23)) - print('6102 est circulaire : ', circulaire(6102)) diff --git a/Fouche_Clement_EVAL/ex2.py b/Fouche_Clement_EVAL/ex2.py deleted file mode 100644 index 7bb76c9..0000000 --- a/Fouche_Clement_EVAL/ex2.py +++ /dev/null @@ -1,42 +0,0 @@ -class Personne: - def __init__(self, name, age): - self.__age = age - self.__name = name - - def get_nom(self): - return self.__name - - def get_age(self): - return self.__age - - def increment_age(self): - self.__age = self.__age + 1 - - -class Eleve(Personne): - def __init__(self, name, age, section): - super().__init__(name, age) - self.section = section - - -class Prof(Personne): - def __init__(self, name, age, matiere): - super().__init__(name, age) - self.matiere = matiere - - -def calcule_moyenne_age(personnes): - total = 0 - for personne in personnes: - total += personne.get_age() - return total / len(personnes) - -if __name__ == '__main__': - eleve1 = Eleve('eleve1', 19, 'CIR2') - print(f"l'élève {eleve1.get_nom()} de la section {eleve1.section} a {eleve1.get_age()} ans") - eleve1.increment_age() - print(f"l'élève {eleve1.get_nom()} de la section {eleve1.section} a maintenant {eleve1.get_age()} ans") - prof1 = Prof('prof1', 40, 'java') - prof2 = Prof('prof2', 50, 'python') - print(f"l'âge moyen des profeseurs est {calcule_moyenne_age((prof1, prof2))} ans") - print(f"l'âge moyen des profeseurs et étudiants est {calcule_moyenne_age((prof1, prof2, eleve1)) : 0.2f} ans") diff --git a/Fouche_Clement_EVAL/ex3.py b/Fouche_Clement_EVAL/ex3.py deleted file mode 100644 index 40379a6..0000000 --- a/Fouche_Clement_EVAL/ex3.py +++ /dev/null @@ -1,38 +0,0 @@ -import cmath -import turtle -import time - -turtle.speed('fastest') -def get_racine(radius, number): - out = [] - com = cmath.sqrt(radius ** 2 - (radius / 2) ** 2) - for i in range(number): - com = com * cmath.exp(2j * cmath.pi / number) - out.append(com) - return out - - -def printminicircle(x, y, radius=3): - turtle.up() - turtle.goto(x, y) - turtle.down() - turtle.filling() - turtle.fillcolor(0, 0, 0) - turtle.begin_fill() - turtle.circle(radius) - turtle.end_fill() - - -def draw(): - i = 1 - path = get_racine(100, 60) - while i > -1: - for point in path: - printminicircle(point.real, point.imag) - time.sleep(1) - turtle.clear() - i = i + 1 - -if __name__ == '__main__': - draw() -