Learn creative coding writing simple programs

57. A random sentence generator writes nonsense

The improved version of the silly poet can save images to the hard drive when we press a key on the keyboard. It also generates a new sentence when we click the display. That means we must listen to keyboard presses using the keyPressed() function, and we also listen to the mouse clicks using mousePressed(). Both of these functions require that a "void draw()" function exists in our program, even if it's empty. If there is no draw() function, then mousePressed() and keyPressed() will never be called, and you will wonder why :)

Tags: random, words, sentence, absurd, strange, crazy, weird, silly, funny, LOL

Code editor

You can make changes to the code below. Then
Below you can ask and answer questions related to this video. If your question is unrelated to the video, please post it at the Processing Forum as I'm unable to help with all of your programs and still have enough free time to eat and sleep :)
comments powered by Disqus