Skip to main content

Posts

Showing posts from July, 2016

Fibonacci Sequence

                            A Fibonacci sequence is a series of numbers that starts with a zero, followed by a one, and proceeds based on the rule that each number(called a Fibonacci number) is equal to the sum of the preceding two numbers. 0,1,1,2,3,5,8,13,21,34,… •It starts with 0 & 1. •The next number 1 is found by adding the two numbers before it(1+0). •Similarly, the number 21 is found by adding the two numbers before it(13+8). •And the number 34 from (21+13). •And so on… Here is the list 0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597, 2584,4181,6765,10946,17711,28657,46368,75025,121393, 196418,317811,.... Step1 :Input the number (n) till which the Fibonacci series will run Step2 :Let assign a variable a equal to -1 and b equal to 1 Step3 :We add variable a & b and assign it to variable x Step4 :Display the value of x Step5: Assign the value of b to variable a Step6 :Assign the value of x to variable b Step7 :Subtract one f

Flowchart

What is a flowchart?                      A flowchart is a diagrammatic representation of boxes of various kinds  that are connected by arrows to solve a particular problem.                       A flowchart is a type of diagram that  r epresents an algorithm, workflow or process.It is used in analysing,  designing, d ocumenting or managing a process in  v arious fields. Flowcharts have become a popular means for  d escribing computer algorithms. Why use a flowchart?                 It is more effective to  visualise  something graphically  t han it is to describe it with words. Flowchart explain  a process more clearly through symbols and text. To see the working of the above flowchart watch video Click here to Watch on YouTube

Algorithm

What is an algorithm? Algorithm is a set of simple steps written to solve a particular task. There can be many task from waking up to going to school, logging on to a gmail account or finding prime numbers etc. For example write an algorithm for logging onto gmail account and checking your mails. STEP1:Open a browser in your desktop/laptop STEP2:Write gmail address www.gmail.com on address bar url of browser. STEP3:Login onto your gmail account with your username and password STEP4:Check your mails if your username and password is correct STEP5:After doing your work on gmail account, logout. Algorithm is a step-by-step list of directions that need to be followed to solve a problem. A recipe can be considered as a type of algorithm.It tells what ingredients are needed to make the dish and what steps to follow.There can be many different recipes to make a certain dish which looks different but ends up tasting the same when all is said and done. The sam