Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. #1.1.1
  2. x = int(input ("Quel est votre âge ?"))
  3. if x >=18 :
  4. print("Adulte")
  5.  
  6. #1.1.2
  7. x = int(input ("Quel est votre âge ?"))
  8. if x >=18 :
  9. print("Adulte")
  10. else :
  11. print("Enfant")
  12.  
  13. #1.1.3
  14. x = int(input ("Quel est votre âge ?"))
  15. if x >=18 :
  16. print("Adulte")
  17. elif x> 12 and x<18 :
  18. print("Ado")
  19. else :
  20. print("Enfant")
  21.  
  22. #1.1.4
  23. x = int(input ("Quel est votre âge ?"))
  24. if x >=18 :
  25. print("Adulte")
  26. elif x <= 12:
  27. print ("Enfant")
  28.  
  29. #1.1.5
  30. x = int(input ("Quel est votre âge ?"))
  31. if x <18 and x>12 :
  32. print("Ado")
  33.  
  34. #1.1.6
  35. x = int(input ("Quel est votre âge ?"))
  36. if x <18 and x>12 :
  37. print("Ado")
  38. elif x <=0 or x>150 :
  39. print("Inhumain")
  40.  
  41. #1.1.7
  42. tab=["pomme","cerise","framboise","fraise","kiwi"]
  43. print(tab)
  44. y="poire"
  45. tab.append(y)
  46. print(tab)
  47.  
  48. #1.1.8
  49. dico={
  50. "nom":"Renouf",
  51. "prénom":"Elea",
  52. "naissance":"Cherbourg"
  53. }
  54. if "age" not in dico :
  55. dico["age"]="20"
  56. print(dico)
  57.  
  58. #1.1.9
  59.  
  60. x=int(input("Veuillez choisir un nombre ! "))
  61. if x%2==0:
  62. print("Paire")
  63. else :
  64. print ("Impaire")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement