Help! im maybe just stupid but im stuck on booleans Did you define a variable called my_int?


#1

Did you define a variable called my_int?

How do i fix this?


#2

No, you're not stupid. :slight_smile:

Please post your code so we can help you :slight_smile:


#3

Instructions
Set the following variables to the corresponding values:

my_int to the value 7
my_float to the value 1.23
my_bool to the value True


#4

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


#5

Booleans
Great! You just stored a number in a variable. Numbers are one data type we use in programming. A second data type is called a boolean.

A boolean is like a light switch. It can only have two values. Just like a light switch can only be on or off, a boolean can only be True or False.

You can use variables to store booleans like this:

a = True
b = False
Instructions
Set the following variables to the corresponding values:

my_int to the value 7
my_float to the value 1.23
my_bool to the value True


#6

Hi, d1pe!
Will you, please, post your code, so we can help you?


#7

I also had the same problem, my code went as follows:

my_int = 7
my-float = 1.23
my_bool = True

And I dont understand what's wrong. I would appreciate if anyone could help me :slight_smile:


#8

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