Variables and Programming


Variables and Programming:
Program: set of instruction is called Program.
Programming Language: It is used to communicate with the computers.
There are so many programming languages are available in the software market, like: c, c++, Java, Python,…….etc
1.   Procedure oriented or structured oriented(C..)
2.   Non-procedure oriented programming languages /Object oriented Programming language
C++, Java,…python….these are used to develop application(Softwares/Apps)
SQL (Structured Query Language) Which is used to access/communicate with data base servers.

Algorithms:
Which gives the solution to the problem in step by step procedure using our own language (like simple English). It is part of software designing phase. 
An Algorithm explains the requirement/problem that how to solve the problem systematically to get the desired output.
Mainly we follow the following steps to design the algorithms
Step1: start

Step2: declaration
Step3: input
Step4: Logic/Formula
Step5: output
Step6: end/stop

Step1: start
Which represents beginning of the algorithm
Step2: declaration
Variable declarations
Step 3: Input
Taking input from the user
Step 4: Logic
The required logic is generated in this step
Step 5: output
It displays the output
Step 6: stop:
It indicates that end of the algorithm
Example algorithms:


Whether the given number is even or odd:
Step 1: we are testing the value for even or odd
Step2: variable declaration
Take one integer variable ‘a’
Step 3: input
Ask the user to read the value and store into integer variable ‘a’
Step 4: Logic:
Test the values is divisible by 2?
Step 5: output:
If the step 4 condition is true, then display the variable ‘a’ is Even number, odd otherwise
Step 6: stop
End of the algorithm.


SQL for creating the employee table in the data base:
CREATE TABLE EMP(
EMPID int,
Ename varchar(255),
Desg varchar(15)
);
EMPID
ENAME
DESG







Next:
Previous: Big Data

Comments

Post a Comment

Popular Posts