System Software, Application Software, and Computer Languages
There are two common types of computer software: system software and application software.
Application software programs are created to accomplish a certain task or collection of tasks. For example, Cisco Packet Tracer is a network simulation program that allows users to model complex networks and ask “what if” questions about network behavior.
System software works between the computer hardware and the application program. It is the system software that controls the computer hardware and allows the application programs to function. Common examples of system software include Linux, Apple OSX, and Microsoft Windows.
Both system software and application software are created using a programming language. A programming language is a formal language designed to create programs that communicate instructions to computer hardware. These programs implement algorithms which are self-contained, step-by-step sets of operations to be performed.
Some computer languages compile their programs into a set of machine-language instructions. C++ is an example of a compiled computer language. Others interpret these instructions directly without first compiling them into machine language. Python is an example of an interpreted programming language.
When the programming language is determined and the process is diagrammed in a flowchart, program creation can begin. Most computer languages use similar program structures.
Programming Variables
Programming languages utilize variables as dynamic buckets to hold phrases, numbers, or other important information that can be used in coding. Instead of repeating specific values in numerous places throughout the code, a variable can be used. Variables can hold the result of a calculation, the result of a database query, or some other value. This means that the same code will function using different pieces of data without having to be rewritten.
For instance, “z = x + y” is an example of a programming expression. In this expression, x, y and z are variables which can represent characters, character strings, numeric values or memory addresses.
A variable can refer to a value. For instance, the expression “a = 10” associates the value 10 to variable a.
A variable can also represent a memory location. The expression “a = 10” represents that the value 10 is stored in some location of the computer memory, which is referred to as ‘a’.
Variables can be classified into two categories:
● Local Variables - These are variables that are within the scope of a program / function / procedure.
● Global Variables - These are variables that are in the scope for the time of the program’s execution. They can be retrieved by any part of the program.
Variables allow programmers to quickly create a wide range of simple or complex programs which tell the computer to behave in a pre-defined fashion.
The image contains icons of percentage signs, addition signs, numbers, email envelopes and gear.
Basic Program Structures
People impart logic to computers through programs. Using specific logic structures, a programmer can prepare a computer to make decisions. The most common logic structures are:
● Conditions (IF – THEN) - This logic structure allows the computer to make a decision based on the result of an expression. An example of an expression is myVar > 0. This expression is true if the value stored in the myVar variable is greater than zero. When an IF-THEN structure is encountered, it evaluates the provided expression. If the expression is false, the computer moves on to the next structure, ignoring the contents of the IF-THEN block. If the expression is true, the computer executes the associated action before moving on to the next instruction in the program.
● FOR Loops – They are used to execute a specific set of instructions a specific number of times, based on an expression. The term loop comes from the fact that the set of instructions is executed repeatedly. While the syntax of FOR loops varies from language to language, the concept remains the same. A variable is a counter inside a range of values identified by a minimum and a maximum. Every time the loop is executed, the counter variable is incremented. When the counter is equal to the defined maximum value, the loop is abandoned and the execution moves on to the next instruction.
● WHILE Loops – They are used to execute a specific set of instructions while an expression is true. Notice that often the instructions inside the loop will eventually make the expression evaluate as false.
Introduction to Python programming
Python is a powerful general-purpose programming language. It is used in web development, data science, creating software prototypes, and so on. Fortunately for beginners, Python has simple easy-to-use syntax. This makes Python an excellent language to learn to program for beginners.
You can find many good examples here: https://www.programiz.com/python-programming
- What is if...else statement in Python?
- Python if Statement Syntax
- Python if Statement Flowchart
- Python if Statement
- Python if...else Statement
- Python if..else Flowchart
- Example of if...else
- Python if...elif...else Statement
- Flowchart of if...elif...else
- Python for Loop
- Python while Loop
- Python break and continue
- Python Pass
and many other with samples.