Welcome to the parté…
Now you’ve arrived, read up on posting questions, especially how to post code blocks.
Aside: Your post doesn’t actually tell us what you want your program to do, or what it does wrong.
Luckily the snippets you provided were extremely simple to diagnose.
If it was any more complex, you would have received a more vociferous greeting from the helpers !
@gigihespanha, your topic has been moved to a more suitable location on the forum. Introductory Tutorials is for tutorials that e.g. you write, not for questions. Feel free to write a tutorial once you have solved your problem