Please enable JavaScript.
Coggle requires JavaScript to display documents.
python, Displaying variables onscreen - Coggle Diagram
python
Creating variables
A variable is a storage box inside a computers memory that allows us the give it a name, put data into it, and change it as much 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 sting. Remember - how you spell the variable, including capitals, has the be followed from then on.
-
-
-
-
-
Comments
Comments are a useful way of leaving notes to explain what you 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.
-
-
-
-
data types
String - any characters, must be surrounded by speech marks. E.g "hello"
-
-
-
Changing a variable
To change a variable, we just put the variable name, the = sign, and then the value we want to change it to.
-
-
-
-
-
-
-