fin cours 3

This commit is contained in:
pvalarcher
2022-10-26 18:22:20 +02:00
parent a261e7597e
commit 1b77a88561
8 changed files with 86 additions and 3 deletions

13
python/3/ex31.py Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
prenom = input("Entrer votre prénom: ")
## si la longueur de prenom < 5
## alors
if len(prenom) < 5:
nom = input("Entrer le nom de famille: ")
chaine = prenom + " " + nom ## concatenation avec un espace
print(chaine.upper())
## sinon
else:
print(prenom.lower())