#8 Boolean in Python | Python Tutorial for Begniner
Key Takeaways
This video tutorial covers the basics of Boolean values in Python, including how to evaluate expressions and use conditional statements to make decisions based on true or false values. The tutorial uses examples to illustrate how to use Boolean values in Python, such as comparing numbers and using if-else statements.
Full Transcript
hello everyone welcome back to my channel code for kids so today we are going to learn about Boolean values so in this video we will see what is Boolean values in Python so we can say not in Python in any programming language we have some Boolean values so we can say in programming we often need to know if an expression is true or false okay suppose if we have any condition like 5 is greater than 3. so here you want this condition is true or false if this condition is true you will get your true value otherwise you will get your false value so here we can evaluate any expression in Python and we will get one or two answers either we will get true or we will get false so this is a Boolean value after that suppose if we want to compare any two values so first thing we have to write some expression based on that expression we will get values so now let's see with the help of example till that you can like share and subscribe our Channel even you can access our playlist in that playlist you will get scratch programming language you will get your app development you will get a python and menu mode okay so so how we will get the expression suppose I want to print foreign now what will happen if I will run this app program so now see this is correct because n is greater than 9 right so what you will get here you will get this is true okay so now how you will run your application in Coca-Cola you need to just press this play button so here see we have a true value after that if I will try it print five is greater than nine so now as you can see this is false because 5 is less than 9 not greater than 9. now if I will run this so what will happen you will get false So based on your condition based on your expression now computer will decide whether this is true or false okay so it is like we have to check the condition even if you will take an example like if there is a rain so you want to go to outside or not because we are a human being so we can take a decision so same like for computer also computer also can take a decision but whatever you will give the code whatever you will give the condition based on that condition of computer will decide what we have to be execute okay after that we can check one more condition like print suppose n is equals to equals to 10 now what will happen yes this is correct because 10 is equals to 10 so you will get true so in this way we can evaluate our Expressions now we will see one more program here like now we will take what if condition okay suppose I have one value equals to 10 b equals to 20. so this is my two variable in the first variable we have a in the second variable we have 20. now we have to just take one expression if B is greater than a okay so what will happen we have to print B is greater than a okay we want to play in a double quote B is greater than a yes what we want to bring like a b is less than a so here you have to take your else condition we need to just print B is less than a in a double course we have to write B is now what is wrong here so here we need to put the colon okay now what will happen if I will run this program C we have two variable equals to 10 b equals to 20 means in the a we have 10 in the B we have 20. now if B is greater than a so what will happen you will get B is greater than a else you will get B is less than a so what will happen see B we have 20 in a we have tail so 20 is greater than a yes this is the correct statement so you will get B greater than e now what will happen if I will take 100 here yes you have to write this answer in a comment box like what you will get here you will get this greater than a or b is less than a so now just check B is greater that m is 20 is greater than 100 no this is not possible because 20 is less than 100 so you will get p is less than eight now just check this you will get B is less than a so in this way we can use our Boolean values which is in a true add false so till that please like share and subscribe our Channel and press the Bell icon if you want more latest update so thank you so much
Original Description
While Python has several numeric types, there is only one logical type: booleans. A boolean can only take 2 values: True or False. Today we answer all of your True or False questions...
To learn Python, start our Python Playlist HERE:
https://youtu.be/NJi6OPO5lY8
Playlist
Uploads from Code For Kids · Code For Kids · 43 of 60
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
▶
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#Scratch Tutorial 1 | How to create your own Scratch account #codeforkids #scratch #Game Development
Code For Kids
#Scratch Tutorial 2 ||How to enable Share Button option in Scratch #codeforkids #scratch #game
Code For Kids
Fish Moving inside an Ocean 🌊🌊 #codeforkids #scratch 🥰
Code For Kids
Scratch Programming | Fish Aquarium game | #codeforkids #scratch #game
Code For Kids
Draw the circle in scratch#codeforkids #scratch #game
Code For Kids
Draw Circles in Scratch || How do you draw shapes on Scratch? #codeforkids #scratch #game #coding
Code For Kids
How to Make a Dino Jump Game in Scratch | Tutorial #codeforkids #scratch #game
Code For Kids
Scratch Tutorial || How to Make a Catch Game in Scratch.|| Scratch Tutorial for absolute beginer
Code For Kids
Scratch Tutorial || Day 1
Code For Kids
Scratch Tutorial || Day 2 (DJ System , Dance and Story writing)
Code For Kids
How to Make A Maze Game in Scratch 3.0 | Scratch 3.0 Tutorial |Scratch Tutorial for begineer
Code For Kids
Scratch Tutorial || Day 3
Code For Kids
Scratch Tutorial || Day 4
Code For Kids
Scratch Tutorial | Cat And Mouse Game | Scratch Tutorial for Beginner
Code For Kids
Scratch Tutorial || Day 5
Code For Kids
how to make dress up game on scratch || Scratch Tutorial for Beginner
Code For Kids
How to Make a Pong Game in Scratch || Scratch Tutorial for Beginner
Code For Kids
Scratch Tutorial || Day 6(part 1)
Code For Kids
Scratch Tutorial || Day 6( Part 2)
Code For Kids
Scratch Tutorial || Day 7
Code For Kids
Scratch Tutorial || Day 8
Code For Kids
How to Make Piano Game || Learn to Use Music Extension || Scratch Tutorial || Day 8
Code For Kids
How to Make Piano Game || Learn to Use Music Extension ||Scratch Tutorial for beginner
Code For Kids
Scratch Tutorial || Day 9
Code For Kids
Scratch Tutorial || Draw Shapes #shorts #codeforkids #youtubeshorts
Code For Kids
Scratch Tutorial |How to Draw Shapes in Scratch #scratch #scratchtutorials #codeforkids
Code For Kids
Day 10|| Scratch Tutorial
Code For Kids
Scratch Tutorial || Archery Tutorial
Code For Kids
#1 || Thunkable Beginner Tutorial Platform Overview
Code For Kids
App Development ||Tutorial 2 || how to add button in Thunkable || Thunkable for beginner #codeforkid
Code For Kids
App Development || Tutorial 3|| Beginner Tip "Change screens with a button click" in Thunkable
Code For Kids
Scratch Tutorial ||
Code For Kids
Thunkable Tutorial || Using Camera and Image Recognition components with Thunkable
Code For Kids
Build a Translator App with Thunkable ||Thunkable App Development || Tutorial 5||
Code For Kids
Thunkable Beginner Tutorial #6 || Web Viewer|| Redirecting App
Code For Kids
#1 World in Python || Python Tutorial || Python Programming || Google Colab
Code For Kids
#2 Python Tutorial for Beginners | User input in Python | Command Line Input | Python Variable
Code For Kids
#3 Python Comments | How To Write Comments In Python | Python Tutorial For Beginners |
Code For Kids
#4 Python Tutorial for Beginners | Data Types in Python
Code For Kids
#5 Numbers & Typecasting in python | Python Tutorial
Code For Kids
#6 Strings Tutorial | How To Use Strings In Python | Python Tutorial | Python Training |
Code For Kids
#7 Slicing And Other Functions In Python | Python Tutorials For Absolute Beginners.
Code For Kids
#8 Boolean in Python | Python Tutorial for Begniner
Code For Kids
#9 Python Tutorial for Beginners | Operators in Python
Code For Kids
#10 Lists And List Functions | Python Tutorials For Absolute Beginners
Code For Kids
#11 Tuple in Python | Python Tutorial
Code For Kids
#12 In Python | Python Sets Tutorial | Python Tutorial for Beginners | #python #pythonprogramming
Code For Kids
#13 If Elif Else Statement in Python || Python Tutorial for Beginners |
Code For Kids
#14 While Loop in Python ||Python Tutorial for Beginners
Code For Kids
Python Tutorial for addition of 2 numbers #shorts #youtubeshorts #codeforkids #pythonprogramming
Code For Kids
Python Tutorial for absolute Beginner|| While loop #pythonprogramming #shorts #youtubeshorts
Code For Kids
Machine learning for the kids with Scratch || Machine Learning for kids ||Day 1
Code For Kids
# Tutorial 1 || Machine Learning for kids | Image Classification example | Girl and boy
Code For Kids
#15 For loop in Python || Python Tutorial for Beginner
Code For Kids
# Tutorial 2 || Machine Learning for kids | Smart Home Automation | Turn On the Fan
Code For Kids
#Tutorial 3 || Snapchat Filter in Machine Learning|| Machine Learning for the kids ||
Code For Kids
#Tutorial 4 || Image Identification || Machine Learning for the kids|| Tiger , Elephant, boy
Code For Kids
Scratch Tutorial || Apple Catcher Game || Fruit Catcher|| catch game in Scratch
Code For Kids
Scratch Tutorial || How to record audio in Scratch || Scratch Tutorial for beginner ||
Code For Kids
Scratch Tutorial || how to translate language in scratch || Scratch tutorial for beginner
Code For Kids
Related Reads
🎓
Tutor Explanation
DeepCamp AI