Python error


#1

The link is given below:
Lesson 7(or).
The following is given below:
bool_one = 2**3 == 108 % 100 or ‘Cleese’ == ‘King Arthur’

bool_two = True or False

bool_three = 100**0.5 >= 50 or False

bool_four = True or True

bool_five = 1100 == 1001 or 3 * 2 * 1 != 3 + 2 + 1
print bool_five
print bool_three
print bool_three “+” bool_five
Output should be:
False
False
False False


But it is showing some error:

File “python”, line 12
print bool_three “+“and”+” bool_five
^
SyntaxError: invalid syntax

So I want to know what can I do now in order to remove the error.

THANK YOU


#2

So the problem is coming from this line:

print bool_three “+” bool_five

Think about what you want to do with the two variables, bool_three and bool_five. If you want to print both their values to the console, is the code above the correct way to do it?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.