Learn creative coding writing simple programs

13. Event happening only sometimes

We use the print() function for the first time. Using print we can find out the value of a variable and display messages below our program.
When something is not going as expected it can be useful to add some print() calls to our program. We can print the value of a variable, or just print a text to find out if that part of the program is running or not.
print() is your friend :)

Tags: Learn

Code editor

You can make changes to the code below. Then

Questions and comments

Try to stay close to the topic of this episode. Use the Processing forums for help with unrelated Processing projects (or hire me for help ;-)

To indicate that a word in your comment is code, use the `backtick`. Example
  Do `float` and `int` smell similar?
To highlight code blocks, use ```processing and ``` like this:
  void setup() {
    size(600, 600);