22 Commits

Author SHA1 Message Date
a4493e6248 update 2025-01-11 16:16:24 +01:00
ff96ee96dd Update repo 2025-01-06 16:20:30 +01:00
69b3234c15 fix 2022-12-18 00:32:21 +01:00
70e3c4e9f3 fix 2022-12-18 00:10:23 +01:00
SVNET
858284cfd7 divers 2020-02-25 18:04:59 +01:00
SVNET
9af58e79de Pause en fin de programme 2020-02-25 17:50:04 +01:00
SVNET
222154c92a Choix du nombre de tours+optimisation score 2020-02-22 19:01:04 +01:00
SVNET
4101373e00 2020-02-22 16:53:41 +01:00
root
0089ea0255 Merge branch 'master' of gitea@git.weblib.re:svnet/calculmental_python.git 2020-02-22 16:48:35 +01:00
SVNET
a504c0d558 2020-02-22 16:48:20 +01:00
Samuel VERMEULEN
3a3f034d8b Supprimer '__init__.py' 2020-02-22 16:47:33 +01:00
Samuel VERMEULEN
f5538e7d51 Supprimer 'setup.py' 2020-02-22 16:45:50 +01:00
SVNET
00b27dd241 Signe ÷ 2020-02-22 16:34:20 +01:00
Samuel Vermeulen
56ebf103b0 pip package 2019-10-21 00:41:06 +02:00
Samuel Vermeulen
d78128178d pip package 2019-10-21 00:40:49 +02:00
Samuel Vermeulen
a8eb324a0f pip package 2019-10-21 00:38:50 +02:00
Samuel Vermeulen
e912fd4388 pip package 2019-10-21 00:31:12 +02:00
Samuel Vermeulen
e01832f8ee 2019-10-21 00:28:36 +02:00
Samuel VERMEULEN
0f1346416a Mise à jour de 'README.md' 2019-09-05 23:35:09 +02:00
Samuel Vermeulen
e09523649c Mettre à jour 'Jenkinsfile' 2018-10-23 23:28:10 +02:00
Samuel Vermeulen
7590f3f177 Ajouter 'Jenkinsfile' 2018-10-23 23:10:39 +02:00
Samuel Vermeulen
ea3ebd0a40 Mettre à jour 'README.md' 2018-10-16 22:42:33 +02:00
2 changed files with 16 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
# calculmental_python
# calcpymental
Faites travailler vos neurones. Petit jeu de calcul mental simple programmé en python inspiré de mon premier programme réalisé à l'époque en Basic sur Amstrad CPC 6128
@@ -9,10 +9,10 @@ Ce script est développé sous Python 3 et doit fonctionner certainement sous Py
```
# Si ce n'est déjà fait !!
sudo apt-get install python3
git clone https://git.weblib.re/svnet/calculmental_python.git
git clone https://git.vermeulen.pro/PYTHON/calcpymental
```
```
cd calculmental_python
cd calcpymental
./calcul.py
```
```

View File

@@ -4,7 +4,7 @@
"""
Created on Wed Jun 27 18:50:20 2018
v0.3
@author: svnet
@author: @samuelvermeulen.pro
"""
import random
@@ -15,8 +15,11 @@ os.system('clear') # On nettoye l'écran
score = 0
tour = 1
while tour <= 10:
print("Votre Score est de ", score, " Points\n") # Affichage du score
ntour = input("nombre de tours ? ")
os.system('clear')
while tour <= int(ntour):
print("Tour :", tour, "/", ntour) # Affichage tours
# Tirage au sort des nombres et des opérandes
a = random.randint(1,1000)
b = random.randint(1,1000)
@@ -25,7 +28,7 @@ while tour <= 10:
# On pose l'opération
if op == 1:
print("Combien font ", a, " + ", b, " = ")
print("Combien font ", a, " + ", b, " = ", end = " ")
resultat = input()
if resultat == "q": #Quitter
os.system('clear')
@@ -47,7 +50,7 @@ while tour <= 10:
os.system('clear')
if op == 2:
print("Combien font ", a, " - ", b, " = ")
print("Combien font ", a, " - ", b, " = ", end = " ")
resultat = input()
if resultat == "q": #Quitter
os.system('clear')
@@ -69,7 +72,7 @@ while tour <= 10:
os.system('clear')
if op == 3:
print("Combien font ", a, " X ", b, " = ")
print("Combien font ", a, " X ", b, " = ", end = " ")
resultat = input()
if resultat == "q": #Quitter
os.system('clear')
@@ -91,7 +94,7 @@ while tour <= 10:
os.system('clear')
if op == 4:
print("Combien font ", a, " / ", b, " = (donnez l'entier)")
print("Combien font ", a, " ÷ ", b, " = (donnez l'entier)", end = " ")
resultat = input()
if resultat == "q": #Quitter
os.system('clear')
@@ -114,4 +117,5 @@ while tour <= 10:
tour += 1 #Incrément tour
print("Partie terminée, vous avez marqué ", score, "point(s)") # Fin de Partie
print("Partie terminée, votre note est de", score, "/", ntour) # Fin de Partie
input("\n\rTouche ENTRÉE pour quitter")