Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. #1.1.1
  2.  
  3.  
  4. x=input('donne moi un chiffre')
  5. if x >= '18':
  6. print(‘adulte')
  7.  
  8.  
  9. #1.1.2
  10.  
  11.  
  12. x=input('donne moi un chiffre')
  13. if x >= '18':
  14. print(‘adulte')
  15. else:
  16. print(‘enfant')
  17.  
  18.  
  19. #1.1.3
  20.  
  21.  
  22. x=input('donne moi un chiffre')
  23. if x >= '18':
  24. print('adulte')
  25. if x < '18' and x > '12':
  26. print('ado')
  27. else:
  28. print('enfant')
  29.  
  30.  
  31. #1.1.4
  32.  
  33.  
  34. x=input('donne moi un chiffre')
  35. if x >= '18':
  36. print('adulte')
  37. if x < ’18' and x > '12':
  38. print('')
  39. else:
  40. print('enfant')
  41.  
  42.  
  43. #1.1.5
  44.  
  45.  
  46. x=input('donne moi un chiffre')
  47. if x >= '18':
  48. print('')
  49. if x < ’18' and x > '12':
  50. print('ado')
  51. else:
  52. print('')
  53.  
  54.  
  55. #1.1.6
  56.  
  57.  
  58. x=input('donne moi un chiffre')
  59. if x < '0' or x > '150':
  60. print('inhumain')
  61. if x >= '18':
  62. print('')
  63. if x < '18' and x > '12':
  64. print('ado')
  65. else:
  66. print('')
  67.  
  68.  
  69. #1.1.7
  70.  
  71. y = 100
  72.  
  73. tab=[1,2,3,4,5,6,7,8,9,10]
  74.  
  75. tab.append(y)
  76.  
  77. print (tab)
  78.  
  79.  
  80. #1.1.8
  81.  
  82.  
  83. dict={"pays":"france"}
  84. dict["age"]= "20"
  85. print(dict)
  86.  
  87.  
  88. #1.1.9
  89.  
  90. y=802
  91. if y%2 == 0:
  92. print ('pair')
  93. else:
  94. print ('impair')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement