Python Basics

Get Started. It's Free
or sign up with your email address
Python Basics by Mind Map: Python Basics

1. Programs use variables and constants to hold values

2. Variables and constants have identifiers (names) which are used to refer to them in the program

3. Variables are able to have the value they contain changed during the execution of the program. The values within constant variables remain the same while the program is running

4. Variable names should be descriptive and consist of lower case words joined by underscores.

5. Constant names should contain all capital letters and should be preceded with the CONSTANT keyboard

6. It is important to know what data types your variables are using. This can be checked by using the type() function in Python.

7. The input() function returns values from the user as String data types. If number inputs are required, the values returned must be cast into Integers using int() or float ()

8. Local variables are those that are declared inside a subroutine. They cannot be accessed by the rest of the program

9. Global Variables can be accessed by all the parts of the programs and are often initialised at the beginning of the program