0% found this document useful (0 votes)
9 views5 pages

Python Module 1 - QB

The document outlines fundamental concepts in computational thinking and problem-solving, including definitions of algorithms, pseudocode, and flowcharts. It provides examples of algorithms for basic operations, discusses the importance of algorithms in programming, and differentiates between various programming constructs. Additionally, it covers topics such as recursion, function definitions, and the advantages of flowcharts in programming documentation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views5 pages

Python Module 1 - QB

The document outlines fundamental concepts in computational thinking and problem-solving, including definitions of algorithms, pseudocode, and flowcharts. It provides examples of algorithms for basic operations, discusses the importance of algorithms in programming, and differentiates between various programming constructs. Additionally, it covers topics such as recursion, function definitions, and the advantages of flowcharts in programming documentation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MODULE – I – COMPUTATIONAL THINKING AND PROBLEM

SOLVING
PART – A (2 Marks)

Q. No Questions CO RBT Level

What is an algorithm?

1 Answer: An algorithm is a finite set of well-defined and 1 R


unambiguous steps used to solve a problem. It produces a
result for given input within a limited time.

Who introduced the term algorithm?

2 Answer: The word algorithm is derived from the name of 1 R


the Arab mathematician Al-Khwarizmi. He described
systematic written procedures to solve problems.

Why are algorithms important in programming?

3 Answer: Algorithms provide the logical steps to solve a 1 U


problem. Programs are built by implementing algorithms in
programming languages.

Write an algorithm for addition of two numbers.

Answer:
Step 1: Start
4 Step 2: Declare variables num1, num2 and sum. 1 U
Step 3: Read values num1 and num2.
Step 4: Add num1 and num2 and assign the result to sum.
sum = num1+num2
Step 5: Display sum Step 6: Stop

What are the building blocks of algorithms?

5 Answer: Statements, state, control flow and functions are 1 R


the building blocks. They define how tasks are performed
and controlled.

Give the syntax of conditional statements.

Answer: The conditional statements act like intersections,


allowing us to change directions
6 on the basis of a given condition. 1 R
The decision statements are:
●​ if
●​ if/else
●​ switch
If-else statement :
If condition
then process 1
else
process 2

Differentiate FOR and WHILE loops.


7 Answer: FOR loops repeat tasks a fixed number of times. 1 U
WHILE loops continue based on a condition.

Define recursion.

8 Answer: Recursion is a technique where a function calls 1 R


itself. It solves problems by dividing them into smaller
sub-problems.

Define function.

Answer: Function allows us to frame the programs into


9 sub-processes. It has a sub set in the program. 1 R
Syntax:
def function_name( parameter list ):
body of the function return [expression]

What is pseudo code?

Answer: It is an informal high level algorithm. It focuses


10 on the concept of solving a problem. It is a simple
1 R
English-like description of an algorithm. It is not machine
executable but easy to understand.

Write the Pseudocode to Find the Biggest of two numbers.

Answer:
START
READ a and b
11 IF a>b THEN 1 A
PRINT “A is big”
ELSE PRINT “B is big”
ENDIF
STOP

How to write a pseudo code?

12 Answer: 1 U
●​ Understand the problem
●​ Start with BEGIN/START
●​ Write steps in simple English
●​ Use standard keywords
●​ Maintain proper structure
●​ End with STOP/END

Define flowchart.

13 Answer: A flowchart is a graphical or symbolic 1 R


representation of a process. It is basically used to design
and document virtually complex processes.

What are the advantages of flowchart?

Answer:
• Communication: Flowcharts are better way of
communicating the logic
• Effective analysis: problem can be analyzed in more
effective way
• Proper documentation: Program flowcharts serve as a
14 good program 1 R
documentation
• Efficient Coding: The flowcharts act as a guide or
blueprint
• Proper Debugging: The flowchart helps in the debugging
process.
• Efficient Program Maintenance: The maintenance of
operating program
becomes easy

Mention the difference between algorithm and pseudo code.

Answer:
Algorithm Pseudo code

An algorithm gives a Pseudo code is one of the


solution to a particular methods that could be used
15 problem as a well defined to represent an algorithm. 1 U
set of steps.

Algorithms can be written Pseudo code is written in a


in natural language format that is closely
related to programming
language

Construct a flowchart that computes the sum of N natural


16 numbers. 1 A
Answer:

What are algorithm notations?

17 Answer: Algorithm notations are methods to represent 1 R


algorithms. Examples include pseudocode, flowcharts and
programming languages.

Define programming.

Answer: Programming is the process of converting an


18 algorithm into code. Programming is implementing the 1 R
already solved problem (algorithm) in a specific computer
language where syntax and other relevant parameters are
different, based on different programming languages.

What is a high-level programming language?

19 Answer: High-level languages are human-readable 1 R


programming languages. Examples include C, Java and
BASIC.

What is algorithmic problem solving?

20 Answer: It is the process of designing algorithms to solve 1 R


problems. It involves analysis, design and implementation
steps.

PART – B (10 Marks)


Q. No Questions CO RBT Level

1 Describe the building blocks of algorithms. 1 U

Develop an algorithm to check whether a number is even or


2 1 A
odd.

Explain the common keywords used in pseudocode with


3 1 U
suitable examples.

4 Create a pseudocode to identify whether a number is prime. 1 A

5 Explain recursion with suitable examples. 1 A

6 Explain flowcharts and their symbols with examples. 1 U

7 Design a flowchart to generate the Fibonacci series 1 A

8 Explain the steps involved in algorithm development. 1 U

Discuss the simple strategies for developing algorithms


9 1 U
with suitable examples.

Analyze the problem of finding the minimum value in a list


10 1 AN
of numbers and explain the logical steps involved.

You might also like