13 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
10 changed files with 16 additions and 75 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

@@ -1 +0,0 @@
name = "calculmental"

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")

View File

@@ -1,32 +0,0 @@
Metadata-Version: 2.1
Name: calculmental-svnet
Version: 0.4.2
Summary: Jeu de calcul mental
Home-page: https://git.weblib.re/svnet/calculmental_python.git
Author: SVNET Libre
Author-email: svnet@weblib.re
License: UNKNOWN
Description: # calculmental_python
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
## Utilisation
Ce script est développé sous Python 3 et doit fonctionner certainement sous Python 2.
```
# Si ce n'est déjà fait !!
sudo apt-get install python3
git clone https://git.weblib.re/svnet/calculmental_python.git
```
```
cd calculmental_python
./calcul.py
```
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

View File

@@ -1,6 +0,0 @@
README.md
setup.py
calculmental_svnet.egg-info/PKG-INFO
calculmental_svnet.egg-info/SOURCES.txt
calculmental_svnet.egg-info/dependency_links.txt
calculmental_svnet.egg-info/top_level.txt

View File

@@ -1 +0,0 @@

Binary file not shown.

Binary file not shown.

View File

@@ -1,22 +0,0 @@
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="calculmental-svnet",
version="0.4.2",
author="SVNET Libre",
author_email="svnet@weblib.re",
description="Jeu de calcul mental",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://git.weblib.re/svnet/calculmental_python.git",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',
)