1.3 Booleans - What am I doing wrong?


Here is what I have for this exercise:

Variable = my_int
Variable = my_float
Variable = my_bool
my_int = 7
my_float = 1.23
my_bool = True

I am getting the following error message:

Oops, try again.
Did you define a variable called my_int?

Can someone assist me?



What do you need these for?


I thought I need to define what the variables are. I'm assuming that's incorrect? (I'm new to this and trying to learn)


This is enough. You don't need to "initiate" variables like Variable = my_int in python.


@datfatcat - why don't I need to define the variables in this execrise?


You did define them?

my_int = 7
my_float = 1.23
my_bool = True

Are they not defined? Python recognizes that these are variables. You don't need to tell Python that they are variables by doing Variable = my_int.


Understood. Thanks for the explanation! I appreciate it


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