Please enable JavaScript.
Coggle requires JavaScript to display documents.
PYTHON - Coggle Diagram
PYTHON
DATA TYPES
String – any characters, must be surrounded by speech marks. E.g. “Hello”.
Integer – any WHOLE number, E.g. 29 or -29
-
-
-
-
-
-
-
Comments
Contents are a useful way of leaving notes to explain what your code is doing. To leave a comment, type a # followed by your message. You can also use this to tell python to ignore a line of code.e
Creating Variables
A variable is a storage box inside of the computers memory that allows us to give it a name, put data in to it, and change it as often as we want.
To create a variable we just give it a name, then the = sign, then the data we want to store in the variable. Remember to use the speech marks if you want to store a string. Remember – how you spell the variable, including capitals, has to be followed from then on.
-
Changing a variable
To change a variable, we just put the variable name, then the = sign, and then the value we want to change it to.
-
-
-
-
-
-