Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Hackers Night Python
  2. Project 1
  3.  
  4. #1.1.1
  5. if x >= 18:
  6. print("Adulte")
  7.  
  8. #1.1.2
  9. if x >= 18:
  10. print("Adulte")
  11. else:
  12. print("Enfant")
  13.  
  14. #1.1.3
  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. if x >= 18:
  24. print("Adulte")
  25. elif x>12:
  26. print ("")
  27. else:
  28. print("Enfant")
  29.  
  30. #1.1.5
  31. if x >= 18:
  32. print()
  33. elif x>12:
  34. print ("Ado")
  35. else:
  36. print()
  37.  
  38. #1.1.6
  39. if x<=0 or x>150:
  40. print("Inhumain")
  41. elif x >= 18:
  42. print()
  43. elif x>12:
  44. print ("Ado")
  45. else:
  46. print()
  47.  
  48. #1.1.7
  49. tab=[1,2,3]
  50. y=4
  51. if len(tab)<=10:
  52. tab.append(y)
  53. #1.1.8
  54. if "age" not in dico:
  55. dico["age"]=20
  56.  
  57. #1.1.9
  58. if x%2==0:
  59. print ("Paire")
  60. else:
  61. print("Impaire")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement