Help ME!


#1

Help me! I just started learning python and i dont really know what to do here. Anybody explain this please?

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

I kept getting an error saying "Did you define a variable called my-int?"

here's the instruction;

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

Im stuck here :frowning:


#2

We'll do the first one for you:

set my_int to the value 7

my_int = 7

The = operator is for assignment. We assign the value on the right side to the variable on the left side. Think of set and assign as synonymous terms.


#3

Thank you so much! :smiley:


#4

hi i am on this task now and i read the advise but it is still not working can you help???:cry:


#5

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