You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
591 B

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 27 18:50:20 2018
@author: svnet
"""
import random
while 1:
# Tirage au sort des nombres
a = random.randint(0,1000)
b = random.randint(0,1000)
print("Tapez 0 comme résultat pour Quitter\n")
# On pose l'opération
print("Combien font ", a, " + ", b, " = ")
op = int(input())
# Vérification
if op == 0:
print("Au revoir et à Bientôt !!")
break
if op == (a+b):
print("Exact !!\n")
else:
print("Faux !!\nLe Résultat était : ", (a+b), "\n")