Introduction to the pc program
Before we start programming , we should always first understand computer programs and the way they work.
A computer virus may be a series of instructions written during a programming language to perform a selected task on the pc .
The two important terms we utilized in the definition above are –
Order of instructions
Computer programming language
To understand these terms, imagine a situation where someone asks you ways to travel to a close-by KFC. What exactly are you doing to guide him to KFC?
You will use human language to work out the trail to KFC as follows:
After half a kilometer, go straight ahead, turn left at the red light then continue for a few kilometer. you’ll find KFC on the proper .
Here you’ve got used English language to point different steps to realize KFC. If they’re followed within the following order, you’ll contact KFC –
- Go straight
- Drive half kilometer
- Take left
- Drive around one kilometer
- look for KFC at your right side
Now attempt to depict things with a computer virus . The above sequence of instructions is really a person’s Program written in English that teaches you ways to urge to KFC from a selected start line . an equivalent sequence could are given in Spanish, Hindi, Arabic, or another human language, provided the person seeking the direction knows one among those languages.
Now let’s return and check out to know a computer virus , which may be a series of instructions written during a computer-oriented language to perform a selected task on the pc . Following may be a simple program written within the Python programing language –
print “Hello, World!”
The above computer virus instructs the pc , “Hello world!” To print. on the pc screen.
A computer virus is additionally mentioned as computer software , which may range from two lines to many lines of instructions.
Computer program instructions also are referred to as program ASCII text file and programming is additionally called program coding .
A computer without a computer virus is simply a dump box. they’re programs that make computers active.
Because we’ve developed numerous languages to speak with one another , computer scientists have developed several programming languages to offer instructions to the pc (i.e., to write down computer programs). within the following chapters we’ll see several programming languages.
Introduction to programming
When you understand what a computer virus is, then we’ll say this: Writing computer programs is named programming .
As mentioned earlier, there are many programming languages which will be wont to write computer programs. a number of them are listed below:
Use of computer programs
Nowadays, computer programs are utilized in most fields, household, agriculture, medicine, entertainment, defense, communication, etc. Below are some uses of computer programs –
MS Word, MS Excel, Adobe Photoshop, Internet Explorer, Chrome, etc. are samples of computer programs.
Computer programs are wont to develop graphics and computer graphics in filmmaking.
Computer programs are wont to perform ultrasound, x-ray, and other medical exams.
Computer programs for SMS, chat and speech are utilized in our mobile phones.
Someone who can write computer programs, or in other words someone who can do programming , is named a programmer .
Based on knowledge of programming language, we will name a programmer as follows:
C ++ programmer
From a programming point of view, an algorithm may be a step-by-step guide to troubleshooting a drag . An algorithm is an efficient method that’s expressed as a finite set of well-defined instructions.
Therefore, a programmer lists all of the steps necessary to correct a drag before writing the particular code. the subsequent may be a simple example of an algorithm to seek out the most important number from a given list of numbers –
- Get an inventory of numbers L1, L2, L3….LN
- Assume L1 is that the largest, Largest = L1
- Take next number Li from the list and do the subsequent
- If Largest is a smaller amount than Li
- Largest = Li
- If Li is last number from the list then
- Print value stored in Largest and are available out
- Else repeat same process ranging from step 3
The above algorithm has been written roughly to assist beginners understand the concept. you’ll encounter more standardized methods of writing computer algorithms as you advance to advanced levels of programming .