Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 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:
  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.  
  30. #1.1.5
  31. x=int(input("Quel est votre âge?"))
  32. if x<18 and x> 12:
  33. print("Ado")
  34.  
  35. #1.1.6
  36. x=int(input("Quel est votre âge?"))
  37. if x<=0 or x>150:
  38. print ("Inhumain")
  39. elif x<18 and x>12:
  40. print("Ado")
  41.  
  42. #1.1.7
  43. tab=["a","ab","abc"]
  44. y="abcd"
  45. tab.append(y)
  46. print(tab)
  47.  
  48. #1.1.8
  49. dico={"fleur":"nature","arbre":"feuille"}
  50. if age not in dico:
  51. dico["age"]="20"
  52. print(dico)
  53.  
  54. #1.1.9
  55. x=int(input("Donnez un nombre "))
  56. if x%2==0:
  57. print ("Paire")
  58. else:
  59. print("Impaire")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement