1.
Variables: A variable is a way to store information that your program needs to use; it includes the variable name, the data type, and the content you’re storing. Variables are generally used to store something that you want to keep using; for example, user input, so that the program doesn’t need to keep checking what the user typed.
A day-to-day equivalent might be a dictionary - e.g. the word bamboozle is a verb and it means to fool or trick someone. The fact it’s a verb tells you how to use it, and storing the definition in the dictionary means you can use it without referring back to the meaning every time.
2.
Conditional Statements/Control Structures: These are a way to outline when a certain piece of code should be executed - for example, if/else conditions will execute if something is true, or do another thing if not. From a computer program perspective, an example could be if the user clicks the ‘yes’ button then carry out a set of actions, else carry out a different set of actions. A real world example would be if you are hungry then eat some food else wait until dinner.
3.
Loops: A loop is a way of repeating a piece of code multiple times, without having to write the same instruction over and over. For example, if you wanted to carry out an action on a list of users, such as printing their age, you could write an instruction for each user to do this, but this would be very repetitive, especially if you had many users. Instead, you would use a for loop to say for first user to last user output the users age.
Last reply 1 month ago
Free website hosting providers with no strings attached?Posted 3 months ago
iDEA silver citizen badge three. Milkshake shack coding problem.Last reply 4 months ago
How do you practice programming java for beginners?Last reply 8 months ago
hows the employment market for tech work in the UK?Last reply 1 month ago
Free website hosting providers with no strings attached?Posted 3 months ago
iDEA silver citizen badge three. Milkshake shack coding problem.Last reply 4 months ago
How do you practice programming java for beginners?Last reply 8 months ago
hows the employment market for tech work in the UK?