Any explanation on this code?

I think this code is created to explain you the basics of logics and if statements so let's try to understand them.

If statement execute code if the given statement is True. Consider the below.

if (True):

print("This will print")

if (False):

print("This will not print")

Now given that you need to understand logics, I recommend w3schools for that but here is a simple explanation of or

or allows the programmer to give two statements to the if statement, if either of these conditions are true then the code get executed. Consider the below code,

if (True or True):

print("This will be printed")

if (True or False):

print("This will be printed")

if (False or True):
print("This will be printed")

if (False or False):
print("This will be not be printed")

Now you understand that in your code, you have True or not False = True, which is similar to below.

if (True or True):
print("This will be printed")

Hope this helps, there is a lot of things that can be done differently in the answer I just gave you, So I recommend reading your class materials or using a reputable website to learn it properly.

/r/pythonhelp Thread