Home Computer Learn Computer Programming

Learn Computer Programming


Computer Programming – Complete Tutorial

Prepare to explore the world of Computer Programming. Learn all about the Basics of Programming.

Let’s get started! Let’s get started!

What is Computer Programming?

Computer programming is a collection of instructions that help the developer perform certain tasks and return the correct output from the inputs.

Below is a Mathematical expression.

Z = X + Y where X, Y, and Z are variables in programming languages.
If X is 550 and then Y is 450, the input values are known as literals.
The computer calculates the value of X+Y. This results in Z. The expected output.

What is the Work of Computers?

Computers are machines that process information. This information could be any data provided by users through keyboards, mice, scanners digital cameras, joysticks, and microphones. These devices are known as Input Devices, and the information they provide is called input.

Storage is required for this information to be stored on the computer. This storage is known as Memory.

There are two types of Memory or Computer Storage.

  • Primary memory or RAM (Random Access Memoria): This internal storage is used by the computers and can be found on the motherboard. RAM can be quickly accessed and modified in any order, or randomly. When the computer is turned off, all information in RAM is erased.
  • Secondary memory or ROM – Read-Only Memory: The information (data) stored within ROM is permanent and read-only. To start a computer, you will need to use the ROM stored instruction.

Processing: This information (input data), is used to perform operations called Processing. The Central Processing Unit, also known as CPU, is responsible for processing input.

Output devices: These are computer hardware devices that convert information into human-readable format. Visual Display Units (VDUs) include a Printer, Monitor, Graphics Output Devices, Plotters, and Speakers.

Developers can analyze a problem and devise simple steps to solve it. For this, they use a programming algorithm. This is similar to a recipe for food, in which ingredients are inputs and the final product is what the client requires.

The recipe contains the ingredients and steps to make a particular food item.

[image ]

The development environment can be modeled as scenarios, use cases, or data flow diagrams.

A simple flow chart that explains the steps and the flow of the solution.

[image ]

The client’s needs will determine whether the solution is desktop, web, or mobile-based.

Basic Programming Concepts

To be proficient in Computer Programming, developers should have a solid understanding of the following concepts.

#1) Algorithm: This is a series of instructions or steps that are to be used to complete a specific task. An algorithm can be designed by a developer to produce the desired output. For Example, a recipe to cook a dessert. Although the algorithm describes the steps required to complete a task, it doesn’t tell you how to do them.

#2: Source code: This is the text used to create the program in the chosen language.

It is required to use the main method in Java. The text is as follows:

#3: Compiler. The compiler is a program that converts source code to binary code or bytes. It is also known as machine language. The program can then be executed with an interpreter.

#4: Data Type – Data used in applications can be different types. It can be an integer, floating-point (decimal points numbers), characters, or object. Example: double currency =45.86. Double is a data type that stores numbers with decimal places.

#5 Variable. A Variable is a space holder that stores the value in memory. This value can then be used by the application. Example: int Age = 25, where age can be used as a variable.

#6 Conditionals: This is knowledge of how to use a condition so that a set code should only be executed if the condition is true. If a false condition is found, the program should be terminated and the code should be stopped.

#7): An array is a variable that stores elements from a similar data type. It will be very beneficial to have a good understanding of how an array is used in programming/coding.

#8 Loop: This loop is used to execute the code series until the condition is met. Loops in Java can be used for loops, do-while loops, or enhanced for loops.

This is the code for loop:

#10 Class: A class is like a template. It contains state and behavior. The equivalent to programming is a field or method. Everything revolves around Class, Object-Oriented languages such as Java.#9 Function: A function or method is a tool that can be used to perform a task in programming. It can take parameters and process them to produce the desired output. Functions can be used to repeatedly reuse them.


Please enter your comment!
Please enter your name here