Using Boolean in Python – let’s go!

This entire series in a playlist:

Also, keep in touch on Facebook:

And Twitter:

Nguồn:https://truonggiabinh.com/

Xem Thêm Bài Viết Khác:https://truonggiabinh.com/cong-nghe/

Using Boolean in Python – let’s go!

This entire series in a playlist:

Also, keep in touch on Facebook:

And Twitter:

Nguồn:https://truonggiabinh.com/

Xem Thêm Bài Viết Khác:https://truonggiabinh.com/cong-nghe/

you are a life saver

Backup_every_hour = True #@param {type:"boolean"}

How do I remove the underscores and keep it with spaces? I don't like how it shows on the checkbox

You are awesome YK, I am familiar with python, but I go back to your videos to remember ways to make the code cleaner

This is how I did it….

c = 7

d = 4

e = 2

def c_greater_than_d_plus_e(c,d,e):

return c > d + e #true

return c < d + e #false

print(c_greater_than_d_plus_e(c,d,e))

c=int(input("Enter a Integer Number for C : "))

d=int(input("Enter a Integer Number for D : "))

e=int(input("Enter a Integer Number for E : "))

def func(c,d,e):

if c > d and c > e:

print(True)

print("C is Greater Then D and E")

else:

print(False)

print("C is Not Greater Then D and E")

func(c,d,e)

19 really dumb people have watched this!

In pycharm:

def c_is_greater_than_d_plus_e(c, d, e):

return c > d + e

if c_is_greater_than_d_plus_e(6, 2, 1):

print("true")

else:

print("false")

def c_greater_than_d_plus_c(c, d, e):

return c > d + e

edit: got it!

amazing slow and simple perfect thank you so much

So incase of integers…we don't need to insert true or false inside the brackets??? It juz automatically shows true or false if condition is met?

#fuction 3 regards from bolivia

def are_you_sad(if_rainy,has_umbrella):

if if_rainy and not has_umbrella:

return True

else:

False

if are_you_sad(True,False):

print("ohhhhh sorry tomorrow will be your best day")

else:

print("it not the best day but smile")

a=3

b=4

if True:

print("a is the number greater than b")

####even a<b the output is "a is the number greater than than b"…….

how???

What about float I mean real numbers🤐🤐

def if_c_is_greater_than_d_plus_e(c, d, e):

return c > (d + e)

print(if_c_is_greater_than_d_plus_e(70, 80, -10))

Try_again = True

def is_CS_Dojo_awesome(makes_videos, is_mean, helped_me):

if makes_videos == True and is_mean == False and helped_me == True:

return True

else:

return Try_again

Which software do you use to explain the concepts. The software with black background not jupiter notebook

I appreciate your videos and I try my best to watch them all the time

I have a question when can I start coding

When can I try to write script or so on and I'm by the Boolean lesson 11 now

Thanks a lot

1.1k likes to 11 dislikes. LOL

YK, YOU are the best!

please explain AI Programming in python

Plz regression topic can u clear.

please tell me when return is used and print is used!! I'm a bit confused between them

CS Dojo: Can return be used to return a number other than True or False. Let's say return C, else D ?

Why Microsoft and not Orange? or Lemon or Berry? hahahahahaha…

Please tell difference between return and yield

Hey, if you could cover arrays in python it would be awesome !!!

Good job, YK!

Make a video about github. I really don't know how to use that platform.

When you have if True youll always get the string printed? I dont understand why if a > b is the saame as if True , I mean its the same because if a is greater than b you will print that and if True always print whatever you expect to be printed right?

Thanks for these videos.

def c_greater_than_d_plus_e(c, d, e):

if c > (d + e):

return True

else:

return False

print(c_greater_than_d_plus_e(5,1,3))

print(c_greater_than_d_plus_e(2,1,3))

True

False

That doesn't work in python.. Doesn't it?

Thank you sir… 🙂

def c_greater_than_d_plus_e(c, d, e):

return c > d + e

CMIIW

list of the order of computation as c > d+e without parenthesis bothered me a little:

https://www.programiz.com/python-programming/precedence-associativity

hello! kindly explain how to use loops in Python. i want to repeat my code unless i give it command to stop.

simply i want a replacement for do-while loop in c++.

if you are not using Jupyter Notebook and just a regular ide make sure you use print to return true or false!!!

I have a question. In line 6 you didnt mentioned a,b then how you got the output?plz help

Hayy,Please give tutorial on python debugging

Love the problems you give within the videos! Thank you!

could you also make a video on how to use Python and SQL, and when someone might do so

would be great to see a video on how best to use Python for data analysis

If I put integers on the are_you_sad(a,b), it gives me some different results.

For example,

1. are_you_sad(0, 'any integers') always gives me 0.

2. are_you_sad(1,0) gives me True.

(From here, I guessed that integer 1 means True for Boolean and 0(or any other integers except 1) means False)

3. are_you_sad(2,2) gives me False.

For the logical expressions, does the integer 1 means True and any other integers but 1 means False?

Also, can you explain why are_you_sad(0,10) gives me 0, not False?

I'm pretty sure CS Dojo did 911. You can see it at 7:30 if you square all the numbers in the brackets. Kind of scary…