Wednesday, November 8, 2017

Uki2 Class 3 - Programming

Today is the third class @ Uki. Usually the class started by 9 a.m by doing exercise.

Then touch typing  and blogging were done..
After that an introduction to Linux and its commands were educated.
After lunch the class is about pseudo code and flow chart.
Following the tea break we played team building games and finished the class.

So, here are the informations I learned from today's class.

The Linux Commands & Pseudo code 

Linux is one of the Free Operating System which offers all stuffs for free since starting of 90's. Mostly used server side Operating system and nearly 2.5% of Desktop users are using in their personal computers. Linux is the most reliable, secure and worry-free OS. 

Worry-free means 
  • No license
  • No need to clean up the computer system system
  • Free from Virus / Malware attacks
  • Free Updates
  • Free Softwares
  • Free Server
Linux is also distributed under an open source license. Open source follows the following key philosophies:
  • The freedom to run the program, for any purpose.
  • The freedom to study how the program works, and change it to make it do what you wish.
  • The freedom to redistribute copies so you can help your neighbor.
  • The freedom to distribute copies of your modified versions to others.
The most popular Linux distributions are:
  • Ubuntu Linux
  • Linux Mint
  • Arch Linux
  • Deepin
  • Fedora
  • Debian
  • openSUSE.
Terminal Commads On Ubuntu.. ( Similarly Command Line in Windows Products)

Below are some basic and important Terminal commands to be in a user's mind to work properly in Ubuntu.

1. cd : Changing directory (cd) is the main command that always be in use in terminal. It's one of the most Linux basic commands. Using this is easy. Just type the name of the folder you want to go in from your current directory.
             Eg:-     /home $ cd Desktop                      /home/Desktop $

2.mkdir :-  to create a new folder or sub folder. You can use mkdir command to do that. Just give your folder name after mkdir command in your terminal.


3. ls (list)  :  The terminal will show all the files and folders of the directory that you're in.


4. cat :  To view some of text or code from a script in the Terminal Window
                                     E.g:     $ cat parathan.html


5.man : The man command is used to show what are the function of command we use. We can take all information about the command.( Manual )
                                            Eg:  $ man cd  
- This will show all the function performed by cd command. (Change Directory)


6.rmdir : Used to remove the directory. For example if you want to delete parathan folder from Desktop...
          E.g:   /home/Desktop $ rmdir Parathan


7.touch : Used to create files in a directory. Its like, for creating a directory we use mkdir command... To create .txt .pdf .html .js files, we use this command.
E.g: /home/Desktop $ touch Parathan.txt
So here, a .txt extension file will be created....


8. rm : Delete a file from a directory...
                          E.g: /home/Desktop $ rm parathan.txt
So, here parathan.txt named text file will be deleted from the Desktop.


9. locate : Used to search a file you don't know where you saved it in Linux OS.


10. clear : clean the whole commands in Terminal

11. cp    : Copy Files

12.logout : Logs the current user off the system.

13. pwd : Displays the path name for current directory

14. who :  Display who is logged on.

15.  passwd [name [password]]  : Change the password or allow (for the system administrator) to
change any password.

Introduction to Linux and Basic Commands (Video Tutorial)


Pseudo code and Flowchart 

Algorithm is a set of instruction in plain language statement to be executed to solve a problem. 

Algorithm is usually transformed into pseudo code or program flowchart.
Then the algorithm is tested in pseudo code or flowchart and after that it will be written in a specific programming language.

Flowchart : One of the best method to illustrate a solution for a problem by graphical method using arrows and etc...  Flowchart method is used all over the world in different field to solve problems.

Pseudo code : Pseudo code is for developers who can understand in their own language. The computers can't understand. It gives a brief explanation about how a program should be written.
                                           ./or./
The following are definitions for Pseudo code from Internet

  1. Pseudo code is an artificial and informal language that helps programmers develop algorithms. Pseudocode is a "text-based" detail (algorithmic) design tool
  2. Pseudocode is a false code which consists of plain English statements, mathematical notations and keywords that are commonly found in high level languages.
Pseudo Code Components
  1. Variables
  2. Input/Output
  3. Assignment
  4. Selection
  5. Repetition
1.Variable : A variable has a name, and a value. When a variable is declared certain bytes of memory is allocated in computer memory. We can call those variables anytime.

These are the rules while assigning name to a variable:

  1.  There is no space in a variable name
  2.  Variable name should not be a keyword of pseudocode
  3.  Variable name should be relevant.

2.Input / Output : 
Input : We use Input operation to ask value or name to start the program. The keyword we use to do Input operation

  • Input 
  • Read 
  • Enter 

Output : We use out put operation to give the final result to user. The
keyword we use for Output operation are..

  • Output
  • Write
  • Print


3.Assignment : Assignment is the physical act of placing a value into a variable. Assignment can be shown using
  1. Assign 4 to y
  2. Set y equals to 4
  3. y=4
4. Repetition : The program will repeat as per the given condition.

5.Selection : The option choosing structure in pseudo code. It will choose the path according to a given condition.

Types of Pseudo code...
  • Selection
  • Repetition
  • Sequence

Some Real world 
examples for
  • Selection
  1. Passing an exam
  2. Will rain today..??
  • Repetition
  1. Dig the soil for about 10 m depth
  2. Taking exam for particular times (Pass / Fail)
  • Sequence
  1. Switch on TV
  2. Making Tea
Pseudo code for calculating area of Sphere..
  1. Begin
  2. Input value for radius
  3. Calculate are (4 * pi * radius*radius)
  4. Output Radius and Area
  5. End
Flow chart has 5 components
  1. Basic Input/Output Symbol
  2. Basic Processing Symbol
  3. Decision Symbol
  4. Flow line Symbol
  5. Start/End Symbol
That's all for the day...
♥ Parathan.

No comments:

Post a Comment