-
Notifications
You must be signed in to change notification settings - Fork 3
/
5_boolean_and_operators.py
116 lines (83 loc) · 3.13 KB
/
5_boolean_and_operators.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Hi, agar koi question or query ho to YouTube Channel par comment kar sakte ho otherwise mail me on heykyakaru@gmail.com
# YouTube Channel Link: https://www.youtube.com/channel/UCphs2JfmIClR62wbyf76HDg
# New updates ke liye visit
# Also contact for College Project & Project Report
# HEY KYA KARU यूट्यूब चैनल के जरूरी लिंक
# 1. Python Basic and Advance ट्यूटोरियल प्लेलिस्ट https://www.youtube.com/playlist?list=PLK6wiPavf7QikS9PMYrGZXz1HlE1KZLD3
# 2. PHP Projects प्लेलिस्ट https://www.youtube.com/playlist?list=PLK6wiPavf7QiEj6IPc3lkjz1wR4w9RM6B
# 3. GitHubट्यूटोरियल प्लेलिस्ट https://www.youtube.com/watch?v=LUyVs2MTlTM&list=PLK6wiPavf7Qjydpc5v-hdIoqCx2V19pHP
# 4. Python Project https://www.youtube.com/watch?v=3lrbbB38zpU&list=PLK6wiPavf7Qj-NLJhbkxw9QfonweHafcN
# 5. Tips and Trick for Programming: https://www.youtube.com/watch?v=vPL6ODrfcwI&list=PLK6wiPavf7QiVLYXrC2TW_fdcZp57MgMB
'''
Topics: Boolean Number System
'''
# Boolean Values: True & False
print(15 > 6)
if 5 < 6:
print('Yes its right')
else:
print('No itr not right')
# Evaluate Values and Variables bool()
# jab bhi bool() method ke andar 1 ya 1 se greate ya any string value ho to ye hame true
print('\nCHeck number: ',bool(888687))
print(bool(0))
print(bool())
name = input('Enter your name: ')
# print('Nmae: ',bool(name))
if bool(name) == True:
print('\nUser enter his name.')
else:
print('\nUser not enterd his name')
def check():
message = 'Hello check method'
return True
if check() == True:
print('Yes your message get by check method')
# Most Values are True: non-empty values
# Some Values are False: false, empty,0
# Functions can Return a Boolean
'''
Topics: Operators
Arithmetic operators: +, -, *, /, %, **, //
Assignment operators: =, +=, -=, *=, /=, %=, **=, //=,
Comparison operators: < > >= <= == != !< !>
Logical operators: and or not
Identity operators
Membership operators
Bitwise operators
'''
x = 10
y = 9
print('\nCheck 8==9', 8 == 9)
print('\nCheck 8!=9', 8 != 9)
blue = 10
red = 15
green = 5
if not(blue > green):
print('\nGreen and blue > green')
else:
print('blue > green not accepted')
name = 'python is program'
# print('python' is name)
print('python' not in name)
# if 5 > 3 & 5 < 10:
# print('Yes')
a =5
b = 10
c = 20
if a > b:
print('a > b')
elif b > c:
print('b > c')
else:
print('non of the condion satifsyed')
'''
Question:
1. user se input lena hai aur agar user kewal digti enter kar raha hai to ture message otherwise false message show karana hai?
'''
'''
Excercise:
1. create a program in which get the input by two users as a 2 numbers and if the user one number is greater then the user two then show the message that the user one's number is greater and user one win or otherwise show the wining message for user two.
2. program banao jisme 5 user input a,b,c,d,e le rahe ho aur inmes agar a,b,c ki value d,e se greate hai to output show karoa nahi to de ki value show karo
3. 2 value ke bich sabhi arithmatic operations perform karne ka program bano
'''