Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if 5 > 2:
- print("Five is greater than two")
- print("____________________________")
- print("Enter your name:")
- x = input()
- print("hello, " + x)
- print("_______________________________________")
- x = 5
- if x == 5:
- print('x = 5')
- print('________________________')
- username = 'Ahmed'
- password = '12345'
- if username == 'Ahmed' and password == '12345':
- print('login success , welcome Ahmed')
- if username == 'mohamoud' and password == '123456':
- print('login success , welcome ahmed')
- if username == 'mohamoud' or password == '12345':
- print('login success , welcome mohamoud')
- print("_)___________________)(")
- x = 500
- if x > 600:
- print('x is bigger than 600')
- else:
- print('x is smaller than 600')
- print("____________________________________")
- username = 'mahmoud'
- password = '12345'
- if username == 'mahmoud' and password == '123456':
- print('login success, welcome mahmoud')
- else:
- print('Login faild , try Again or reset your password ')
- x = 200
- if x == 100:
- print('x = 100')
- elif x == 150:
- print('x = 150')
- elif x == 210:
- print('x = 200')
- elif x == 220:
- print('x = 200')
- elif x == 90:
- print('x = 90')
- else:
- print(x)
- print('Ahmed a mohammed')
- print("_________________________________________________-")
- x = 200
- if x == 100:
- print('x = 100')
- elif x == 150:
- print('x = 150 ')
- elif x == 200:
- print('x = 200')
- if x > 100:
- print('x > 100')
- if x < 300:
- print('x > 300')
- elif x == 220:
- print('x = 200')
- elif x == 90:
- print('x = 90')
- else:
- print(x )
- x = 3
- y = 4
- z = 5
- if all([x==3 , y==4 , z==5]): #All condition
- print('All Done')
- if any ([x == 3 , y == 5 , z == 4]): #Only one
- print('any done')
- x = 5
- y = 6
- z = 3
- r = 2
- if all ([x == 1 , y == 6 , z == 3 , r == 2 ]): # All condition
- print('all done')
- if any ([x == 2, y == 9 , z == 9 , r == 1]): # Only condition
- print('any done')
- players = {'treka': 1 , 'barakat': 2}
- if 'treka' in players : # this is Dictionary
- print('found')
- a = 1
- b = 2
- if a == 1 and b == 2:
- print(True)
- if a == 0 or b == 2:
- print(True)
- if not (a == 1 and b == 3):
- print(True)
- if a != 0 and b != 3:
- print(True)
- number = 1
- if not number == 2:
- print('True')
- birds = {"cormorant": 1, "cardinal": 2 }
- if "autombile" not in birds:
- print("not found")
- x = 1
- if x in (0,2,4):
- print("match")
- else:
- print("not match")
- value1 = 10
- value2 = 10
- equal = value1 == value2
- if equal == True: print(1)
- if equal != False: print(2)
- a = 33
- b = 33
- if b > a:
- print('b is greater than a')
- elif a == b:
- print('a and b are equal')
- a = 200
- b = 33
- if b > a:
- print("b is greater than a ")
- elif a == b:
- print("a and b are equal")
- else:
- print("a is greater than b")
- a = 200
- b = 33
- if b > a:
- print("b is greater than a")
- else:
- print("b is not greater than a ")
- a = 200
- b = 33
- c = 300
- if a > b: print("a is greater than b")
- print("A") if a > b else print("B")
- if a > b and c > a:
- print("Both condition are True")
- if a > b or a > c:
- print("At least one of the conditions is True")
Add Comment
Please, Sign In to add comment