0% found this document useful (0 votes)
8 views

python question bank

Hi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

python question bank

Hi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

MAHENDRA COLLEGE OF ENGINEERING

PROBLEM SOLVING USING PYTHON PROGRAMMING – question


bank

Two marks
1.What are the factors used to judge the quality of the algorithm?

2.Which is better iteration or recursion? Justify your answer.

3.How will you analyze the efficiency of an algorithm?.

4.Write the pseudo code to calculate the sum and product displaying the answer
on the monitor screen.

5.Write an algorithm to find the minimum number in a given list of numbers.

6.What is python comments?

7.Identify the operand(s) and operator(s) in the following expression:

sum=a+b

8.Write down the output for the following program. first = 'throat' second =
'warbler' print first + second

9.What is python indentation?

10.Write a snippet to display “Hello world” in python interpreter.

11.Write an algorithm to accept two numbers. Compute sum and print the
result.

12.Write an algorithm to find the biggest of three numbers.

13.What are the benefits of pseudocode?

14.What are the factors used to judge the quality of the algorithm?

15.Write an algorithm to guess an integer in the given range of numbers.

16.How do you assign a value to the tuple in python?

17.What are keywords? Give an example


18.Write down the output for the following program.

>>> T1 = (10,20) >>>T2=(100,200) >>>T1,T2=T2,T1

>>>print(T1) >>>print( T2)

19.What is numeric literal?

20.Write a python program to exchange the values of two numbers without


using temporary variable.

Ten marks

1.Explain the flowcharts. guidelines for preparing flowcharts, benefits and


limitations of using

2.What is Programming Language? What are its types? Explain them in detail
with their advantages and disadvantages.

3.Explain briefly Towers of Hanoi?

4.Explain the various expressions supported by python with example.

5.Write an algorithm to insert a card into a list of sorted cards

6.Explain the various arithmetic operators in Python with an example.

7.Explain about the algorithmic problem solving technique with suitable flow of
process and example.

9.Explain the importance of tuple assignment, mutable and immutable data


types with suitable example.

10.Write about different types of python operators with example scripts.

11.Write an algorithm to compute the factorial of a number n.

12.Explain about interpreter and explain how python works in Interactive mode
and script mode with examples.

You might also like