Learning to code is for everyone and it is fun, create digital art, make games, explore AI, IoT and robotics.
This is an opportunity to have a go at coding, you don’t need to understand it but you can learn through doing. If you want to learn how to code then I have a course for you as a series of eBooks (kindle on Amazon) which you can use on any device (you don’t need a kindle) even your phone. Click on this link https://www.amazon.co.uk/dp/B09KPVLBL1 for the first book in the series or visit the home page on www.thehappycoder.org.
Here you can have a go by typing in the code and running it. These are just coding snippets or doodles. So if you have never coded before here is your chance to try for free. You can’t fail, you can only try. Just follow the instruction below:
delete to code that is already there below,
type the code that is below,
take care to do it exactly as shown,
Press the play button,
try changing things to see what happens,
that is the best way to learn, play, experiment and try things.
The web editor, delete the code below…
…now add this code
let speed = 5
x = width/2
y = height/2
choice = random(1)
if(choice < 0.25)
x = x + speed
if(choice >= 0.25 && choice < 0.5)
x = x - speed
if(choice >= 0.5 && choice < 0.75)
y = y + speed
if(choice >= 0.75 && choice <= 1)
y = y - speed
stroke(random(255), random(255), random(255))