renommé : entier.py -> 1/entier.py

renommé :         exo1.py -> 1/exo1.py
	renommé :         exo2.py -> 1/exo2.py
	renommé :         exo3.py -> 1/exo3.py
	renommé :         exo3b.py -> 1/exo3b.py
	renommé :         first.py -> 1/first.py
	renommé :         loop.py -> 1/loop.py
	renommé :         math0.py -> 1/math0.py
	renommé :         string0.py -> 1/string0.py
	nouveau fichier : 2Prog.md
This commit is contained in:
2022-10-13 21:51:40 +02:00
parent 02afd53f1b
commit 84d386a4ae
10 changed files with 0 additions and 0 deletions

21
python/1/exo1.py Normal file
View File

@@ -0,0 +1,21 @@
# Ecrire une suitre de commande qui
# demande votre prénom, votre nom, votre age et affiche
# "Pierre Valarcher tu as XXX ans"
prenom = input("Votre prénom : ")
nom = input("Votre nom : ")
age = int(input("Votre age : "))
print(prenom, nom, "tu as", age, "ans")
phrase = prenom + ' ' + nom + ", tu as " + str(age) + " ans"
# + est la concaténation sur les chaines de caractères
prenom = "Paul"
print(prenom, nom, "tu as", age, "ans")
if age <= 40:
print("tu es jeune")
else:
print("tu es plutot vieux/vieille")