Boolean


#1

Hi

My code is

my_int=7
my_float=1.23
my_bool=True

there is an error for it, what is the source of problem?


#2

Your code works fine for me.
Perhaps it is a browser issue?


#3

I am having the same problem


#4

Remember the spaces before and after the = sign.

my_int = 7
my_float = 1.23
my_bool = True


#5

i am having the same problem with the the first line: my_int is the value of 7


#6

Did you get it to work?
I am using code

my_int = 7
my_float = 1.23
my_bool = TRUE

But it keeps giving me error saying I have not defined TRUE


#7

you have to define True

a = True
b = False
my_int = 7
my_float = 1.23
my_bool = a

this code works and the logic makes sense once you realize that you have to define True to a variable and not capitalize the entire word.


#8

Close the section and try again, its works for me.


#9

You don't have to separately define my_bool to be true.
Problem you're having is that you wrote "TRUE" all caps. It's really important that you have your code specifically right.

It should be: my_bool = True.


#10