Varibles and Types

Python allows you to make variables as objects, you don't need to declare them before using them and you don't need to assign the varible type either.

These are a few of the types of variables:

Numbers
Python supports integers ( whole numbers ) and floating point numbers ( decimals ).

To define an integer you need to simply use the syntax:

Number = 10

To define a float you can use either;

Float = 7.0

OR

Float = float(7)

Strings
Strings are defined with either single quotes or double quotes.

String = 'Python!'

OR

String = "Python"

It is all preference, however using double quotes allows you to include apostrophes whereas the single quotes won't.

Tips
You can perform calculations as long as the variables are numbers and NOT strings:

one = 1

two = 2

three = one + two

* This would print the number 3*

You can also concatenate two strings together like such:

hey = "Hey"

world = "World"

heyworld = hey +" " + world

print(heyworld)

* This would print Hey World*

You can also assign more than one variable simultaneously on the same line like so:

a, b = 3, 4

However, making a mixture of number variables and string variables will not be supported and so if you would like to add a number to a string, you will need to use the str function to change the number into a string.