Alright, so today I learnt there are 4 types of variables which can be assigned. Assigning a variable is using the Equal (=) to assign any value.

Variables can only start with letters or an underscore (_), starting with numbers are invalid.


string1 = “Hello World”

integer1 = 200

float1 = 203.1

The example is for Integer type

You can try it this way too.

The boolean data type can have one of two values, True or False. We use an assignment operator = to assign a boolean value to variables in a manner similar to what we have seen for integer and float values.


TimeisPrecious = True

TimeisMoney = False


It will give you True.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s