Advertisement
rodolpheg

Untitled

Feb 27th, 2021
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. prenom = "Elysée"
  2. nom = "Reclus"
  3. annee_naissance = 1830
  4. note = 9.5
  5.  
  6. # concaténation d'une chaîne de caratères
  7. print(prenom + " " + nom + ", né en " + str(annee_naissance) + ", a obtenu la note de " + str(note) + "/10.")
  8.  
  9. # autre méthode avec la fonction "format"
  10. print("{pr} {nm}, né en {an}, a obtenu la note de {no}/10.".format(pr=prenom, nm=nom, an=annee_naissance, no=note))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement