Learning some of the basics in Git and Ruby
Today we learnt logic: conditionals, loops and hash in Ruby language. We also learned how to use git with the ‘trygit’ console to help us get familiar with git commands. After which we used git cmd to practice with commands such as git init, which is used to create a new repository and other commands such as git add, git commit -m “Add new file”, git status , git log etc.
We were given two exercises in class based on the knowledge we had on conditionals and loops, to create a function that checks if a number is prime, and to also create a function that does the multiplication table. I couldn't get my code to work , I feel like I missed something and I don’t know what it is. I want to understand what it is that I am not doing wrong and correct my mistake in order to follow a clear logical step when writing code.
Tomorrow, we discuss a food for thought on ‘how do we make sure our code works?’, so I reckon I am quite fortunate in that regard. Looking forward to what today brings…