Guest User

Untitled

a guest
Jan 13th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. if 5 > 2:
  2. print("Five is greater than two")
  3.  
  4. print("____________________________")
  5. print("Enter your name:")
  6. x = input()
  7. print("hello, " + x)
  8.  
  9. print("_______________________________________")
  10.  
  11. x = 5
  12. if x == 5:
  13. print('x = 5')
  14. print('________________________')
  15.  
  16. username = 'Ahmed'
  17. password = '12345'
  18.  
  19. if username == 'Ahmed' and password == '12345':
  20. print('login success , welcome Ahmed')
  21.  
  22. if username == 'mohamoud' and password == '123456':
  23. print('login success , welcome ahmed')
  24.  
  25.  
  26. if username == 'mohamoud' or password == '12345':
  27. print('login success , welcome mohamoud')
  28. print("_)___________________)(")
  29.  
  30.  
  31. x = 500
  32.  
  33. if x > 600:
  34. print('x is bigger than 600')
  35. else:
  36. print('x is smaller than 600')
  37.  
  38. print("____________________________________")
  39.  
  40.  
  41.  
  42. username = 'mahmoud'
  43. password = '12345'
  44.  
  45. if username == 'mahmoud' and password == '123456':
  46. print('login success, welcome mahmoud')
  47.  
  48. else:
  49. print('Login faild , try Again or reset your password ')
  50.  
  51. x = 200
  52.  
  53. if x == 100:
  54. print('x = 100')
  55.  
  56. elif x == 150:
  57. print('x = 150')
  58.  
  59. elif x == 210:
  60. print('x = 200')
  61.  
  62. elif x == 220:
  63. print('x = 200')
  64.  
  65. elif x == 90:
  66. print('x = 90')
  67.  
  68. else:
  69. print(x)
  70.  
  71. print('Ahmed a mohammed')
  72.  
  73. print("_________________________________________________-")
  74.  
  75. x = 200
  76.  
  77. if x == 100:
  78. print('x = 100')
  79.  
  80. elif x == 150:
  81. print('x = 150 ')
  82.  
  83. elif x == 200:
  84. print('x = 200')
  85. if x > 100:
  86. print('x > 100')
  87.  
  88. if x < 300:
  89. print('x > 300')
  90.  
  91. elif x == 220:
  92. print('x = 200')
  93.  
  94.  
  95.  
  96. elif x == 90:
  97. print('x = 90')
  98.  
  99. else:
  100. print(x )
  101.  
  102. x = 3
  103. y = 4
  104. z = 5
  105.  
  106. if all([x==3 , y==4 , z==5]): #All condition
  107. print('All Done')
  108.  
  109. if any ([x == 3 , y == 5 , z == 4]): #Only one
  110. print('any done')
  111.  
  112. x = 5
  113. y = 6
  114. z = 3
  115. r = 2
  116.  
  117. if all ([x == 1 , y == 6 , z == 3 , r == 2 ]): # All condition
  118. print('all done')
  119. if any ([x == 2, y == 9 , z == 9 , r == 1]): # Only condition
  120. print('any done')
  121.  
  122. players = {'treka': 1 , 'barakat': 2}
  123.  
  124. if 'treka' in players : # this is Dictionary
  125. print('found')
  126.  
  127. a = 1
  128. b = 2
  129.  
  130. if a == 1 and b == 2:
  131. print(True)
  132.  
  133. if a == 0 or b == 2:
  134. print(True)
  135.  
  136. if not (a == 1 and b == 3):
  137. print(True)
  138. if a != 0 and b != 3:
  139. print(True)
  140.  
  141. number = 1
  142.  
  143. if not number == 2:
  144. print('True')
  145.  
  146.  
  147. birds = {"cormorant": 1, "cardinal": 2 }
  148.  
  149. if "autombile" not in birds:
  150. print("not found")
  151.  
  152. x = 1
  153.  
  154. if x in (0,2,4):
  155. print("match")
  156. else:
  157. print("not match")
  158.  
  159.  
  160. value1 = 10
  161. value2 = 10
  162.  
  163. equal = value1 == value2
  164.  
  165. if equal == True: print(1)
  166. if equal != False: print(2)
  167.  
  168. a = 33
  169. b = 33
  170.  
  171.  
  172. if b > a:
  173. print('b is greater than a')
  174.  
  175. elif a == b:
  176. print('a and b are equal')
  177.  
  178. a = 200
  179. b = 33
  180.  
  181. if b > a:
  182. print("b is greater than a ")
  183. elif a == b:
  184. print("a and b are equal")
  185. else:
  186. print("a is greater than b")
  187.  
  188. a = 200
  189. b = 33
  190. if b > a:
  191. print("b is greater than a")
  192. else:
  193. print("b is not greater than a ")
  194.  
  195. a = 200
  196. b = 33
  197. c = 300
  198.  
  199. if a > b: print("a is greater than b")
  200.  
  201. print("A") if a > b else print("B")
  202.  
  203.  
  204. if a > b and c > a:
  205. print("Both condition are True")
  206.  
  207.  
  208. if a > b or a > c:
  209. print("At least one of the conditions is True")
Add Comment
Please, Sign In to add comment