Basic Concepts for Learning to Code
If you're thinking of learning how to code, these are some of the basic concepts you should be familiar with.
- 2.VariablesYou're going to want to store and manipulate data and you do this using variables. Things you might want to store are: names, ages, temperatures, and mathematical constants.
- 3.ConditionalsWhen you want to do something based on a condition (e.g. Do something when the temperature exceeds 90 degrees). These are really helpful when you want your code to be able to react to changes in variables.
- 4.FunctionsOne of the easiest functions to visualize is a function called add that takes two variables x and y. It might look something like this: add(x, y) and whenever you put some numbers in the place of those variables it will return the two numbers added together.
- 5.LoopsIf you're writing a program that prints out all of the numbers 1 through 100 you don't want to write out every single number. Using loops you can specify how many times a computer should do one task over and over again.