17 lines
377 B
Python
Executable File
17 lines
377 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
## entrer un entier
|
|
## si il est entre 1 et 12
|
|
## alors
|
|
## afficher la table de multiplication
|
|
## sinon
|
|
## rien
|
|
|
|
n = int(input("Entrer un entier compris enter 1 et 12: "))
|
|
|
|
if n >= 1 and n <= 12: ## 1 ≤ n ≤ 12
|
|
for i in range(1, 11): ## [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
|
r = i * n
|
|
print(str(i) + " * " + str(n) + " = " + str(r)) ## i * n = r
|
|
|
|
|