0% found this document useful (0 votes)
12 views4 pages

PYTHON

Uploaded by

Sabarigiri Vason
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

PYTHON

Uploaded by

Sabarigiri Vason
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

2-MARK QUESTIONS

1. What are the building block of algorithm?


As algorithm is a part of the blue-print or plan for the computer program. An algorithm is
constructed using following blocks.
• Statements
• States
• Control flow
• Function
Control Flow Control flow which is also stated as flow of control, determines what section of
code is to run in program at a given time.
There are three types of flows, they are 1. Sequential control flow 2. Selection or Conditional
control flow 3. Looping or repetition control flow

2. Write an algorithm to find minimum of three numbers


Step 1: Start
Step 2: Declare variables a,b and c.
Step 3: Read variables a,b and c.
Step 4: If a<b
If a<c
Display a is the largest number.
Else
Display c is the largest number.
Else
If b<c
Display b is the largest number.
Else
Display c is the greatest number.
Step 5: Stop

3. Define flowchart and write the advantage of flow chart.


Flow Charts
A Flowchart is a diagram that graphically represents the structure of the system, the flow of
steps in a process, algorithm, or the sequence of steps and decisions for execution a process or
solution a problem.
Advantages of Flowchart
Communication: Flowcharts are better way of communicating the logic of the system.
Effective Analysis:
With the help of flowchart, a problem can be analyzed in more effective way.
Proper Documentation:
Flowcharts are used for good program documentation, which is needed for various purposes.
Efficient Coding :
The flowcharts act as a guide or blue print during the system analysis and program
development phase.
Systematic Testing and Debugging :
The flowchart helps in testing and debugging the program
Efficient Program Maintenance:
The maintenance of operating program becomes easy with the help of flowchart. It helps the
programmer to put efforts more efficiently on that part.
4. What is Pseudo code?
Pseudo –False.
Code- Set of Instructions.
Pseudo code means a short, readable set of instructions written in English to explain an
algorithm.
Example:
Pseudocode: To find sum of two numbers
READ num1,num2
sum=num1+num2
PRINT sum
5. Write the pseudocode to calculate the sum and product of two numbers and display
it.
Pseudocode: To find sum of two numbers
READ num1,num2
sum=num1+num2
PRINT sum
Pseudocode: To find product of two numbers
READ num1,num2
multiple=num1+num2
PRINT multiple

6. Differentiate between iteration and recursion.

7. Illustrate the use of * and + operator in string with example.


8. Mention the features of lists in python
9. State about logical operators available in python with example.
10. Identify the operands and operators in the following expression:
sum = a+b

11. What is an algorithm?


12. Write an algorithm to accept two numbers, compute the multiplication and print the
result
13. What are the Guidelines for writing pseudo code?
14. Draw a flow chart to find whether the given number is leap year or not.
15. What are the properties of algorithm?
16. Outline the logic to swap the contents of two identifiers without using third variable.
17. What are Keywords

13-MARK QUESTIONS

1. Draw and explain the various symbols of flowchart and also draw a flowchart to find
the highest mark in a set of n marks.

2. What is flowchart. Explain the Basic design structures in Flowchart

3. Write the algorithm, pseudocode and draw the flowchart for the following: Insert a
card in a list of sorted cards.
4. Write short notes on types of operators in python with appropriate example
5. Explain the steps involved in program development cycle

6. Write the algorithm, pseudocode and draw the flowchart for the following:
1.To find the sum of square root of any three numbers
2.To find the sum of all odd numbers till 100.

7. Explain in detail about the Notation of Algorithm.

8. Mention the list keywords available in Python. Compare it with


variable name

9. Write the following python programs.


1.To Test whether a given year is leap year or not
2.To find factorial of a given number

10. Write and explain the python program to swap two numbers
with and without tempory variables

11. Explain in detail about the building blocks of algorithm

12. Write a recursive algorithm of tower of Hanoi

13. What is Pseudocode? Write a Pseudocode for swapping two numbers without using
temporary storage

14. What is pseudo code? Explain its guidelines and benefits.

15. Explain the design structures in pseudo code.

16. Describe about the concept of precedence and associativity of


operators with example

17. what is recursive function ? what are its advantage and disadvantages? Compare it
with iterative function.

18. Explain briefly constant, variables, expression, keywords.

19. Write the following python programs.


1. To find factorial of a given number
2. Test whether a given year is leap year or not

20. Write the algorithm, pseudocode and draw the flowchart for the following:
Insert a card in a list of sorted cards

15-MARK QUESTIONS
1. Write the algorithm, pseudocode and draw the flowchart to find minimum in a list

2. Write short notes on types of operators in python with appropriate example

3. Define algorithm. Explain in detail about the building blocks of algorithm.

4. Write the algorithm, pseudocode and draw the flowchart for the
Towers of Hanoi problem

You might also like