fin cours 3
This commit is contained in:
13
python/3/ex31.py
Normal file
13
python/3/ex31.py
Normal 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())
|
Reference in New Issue
Block a user