Computers follow your program as a set of instructions, taking each command literally. You must spell out every step to the computer so that it understands what you want it to do.
Computer programs are made up of commands, functions, operations, conditional tests, and loops. Commands give the computer a specific instruction. Functions perform calculations and return a value. Operations take several values and combine them in some way. Conditions test one or more values to get a true or false result. Loops allow the program to repeat a set of instructions many times.
Variables are containers for storing numbers or strings of characters. Variables have names and contents.
Writing a program takes patience. You must first define the problem that the program is meant to solve. Then you must break down the program into smaller and smaller steps until you have steps so small that they are easy for you to handle.
After a program is finished, it may still contain problems called bugs. You have to allow some time for debugging so that your program runs correctly when you are finished.