INTRO TO PROGRAMMING

 This time we're talking about a very interesting topic which is programming , it's a bit of a long topic so it's gonna be in 2 posts 

Programming is found in every device , machine or vehicle, it's what gives any of them their values 

 Programming is giving an order to a device for example, but you'll have to give a step by step instructions for the device to understand what you want and do it right



You might have heard about Programming languages ( java , c++ , etc) ,it's a special computer language .Programming languages teaches you how to write the order in a correct form , where to put the (,) or how to start or end 

Algorithms are the steps of carrying out a task or steps of solving a problem , the word algorithm comes from the name of Arab scholars "Al-Khawarizmi" who invented it in the 8th century 



Why algorithms are called algorithms | BBC

https://youtu.be/oRkNaF0QvnI

Properties of an algorithm :

  • Must be exact
  • Must terminate 
  • Must be effective 
  • Should be general

Problem solving has a number of stages ,at first we define the problem then we do a step by step instruction ( write an algorithm) then writing a code , checking if it works , lastly we write every thing down to help others having the same problem 

There could be more than one algorithm to solve a problem,  using a flow chart is the most common ,it demonstrates the sequential character of an algorithm 


And we know what it is PseudoCode.

Pseudocode is a description of an algorithm that uses natural language but in a more structured form.

EX:-



And we have taken the effect of an example but the special one is Sum of Two Numbers.



-Not all algorithms are steps, they can have decisions or iterations. 

Selection: we use the ‘IF’ Statement.
here we need to ask questions which can be answered with Yes or No
EX:-



There are some exceptions namely:-




-Computers use Boolean values to make decisions like 7-7=0 or 14-6=8

what is Iteration?
Iteration is the process of repeating sections of a program.




   
By :nouran ashraf matarid-21200128


تعليقات