Unit I
1. Define an algorithm
An algorithm is a procedure or formula for solving a problem, based
on conducting a sequence of specified actions
2. Specify any 5 programming
languages Java, C, C++,
Python, PHP
3. Distinguish between pseudo code and flowchart
Flowchart is usually a graphical representation, where as pseudo-code is
something written in a language. Note that they both show the step by
step procedure for solving a problem. One is graphical while one is text
based.
4. Define recursion
Recursion is the process of defining a problem (or the solution to a
problem) in terms of a simpler version of itself. A recursive procedure or
routine is one that has the ability to call itself.
5. Define control flow statement.
A program's control flow is the order in which the program's code
executes. The control flow of a Python program is regulated by conditional
statements, loops, and function calls.
6. What is the concept of towers of Hanoi.
The objective of the game is to move the entire stack of disks from
Tower 1 to Tower 3. You can move only one disk at a time. No disk may be
placed on top of a smaller disk. With 3 disks, the puzzle can be solved in 7
moves. The minimal number of moves required to solve a Tower of Hanoi
puzzle is 2n − 1, where n is the number of disks.
7. Explain list.
In computer science, a list or sequence is an abstract data type that
represents a countable number of ordered values, where the same value
may occur more than once. The name list is also used for several concrete
data structures that can be used to implement abstract lists, especially