I have a book called "Everything you need to ace COMPUTER SCIENCE AND CODING in one Big Fat Notebook" ( not by me ) and using the code from the book I did this