0% found this document useful (0 votes)
3 views44 pages

Python Problem Solving Class Test 1

This document outlines the Class Test 2 for the subject 'Python for Problem Solving & Logic Building' at Shri Shankaracharya Institute of Professional Management & Technology. It includes various questions divided into three parts, covering topics such as algorithms, data types, control statements, and string manipulation in Python. The test consists of compulsory and optional questions with specified marks and Bloom's taxonomy levels.
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)
3 views44 pages

Python Problem Solving Class Test 1

This document outlines the Class Test 2 for the subject 'Python for Problem Solving & Logic Building' at Shri Shankaracharya Institute of Professional Management & Technology. It includes various questions divided into three parts, covering topics such as algorithms, data types, control statements, and string manipulation in Python. The test consists of compulsory and optional questions with specified marks and Bloom's taxonomy levels.
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

Shri Shankaracharya Institute of Professional Management &Technology, Raipur

DEPARTMENT OF AI & ML/ DS

Class Test: 2 Session: July-Dec: 2025-26 Month: January


Semester:1 Subject: Python for Problem Solving & Logic Building
Code: 3022A01CT022 Time Allowed: 2.5 Hrs Max. Marks:60
Note:- i) Question A is compulsory (4 marks).
ii) From Questions B,C,D&E attempt any two questions ( 8 marks each).
Levels of
Q.
Questions Marks Bloom’s CO
No
taxonomy

PART-1

Briefly explain the identification of computational problem with L2


1.A 4 CO1
example. (Understanding)

Explain the blocks of an algorithm (statement, state, control flow,


1.B 8 L3(Apply) CO1
function) with an example.

Explain the basic symbol of the flow chart. Write the algorithm
1.C 8 L6(Design) CO1
and draw flowchart for Fibonacci Series Algorithm.

Design a Python program for recursive solution for the Tower


1.D of Hanoi problem for n disks. Show the execution flow by 8 L6(Design) CO1
showing all recursivecalls for n = 3 (where n is the number of
disks).

If you have a list of cards (numbers) already sorted in ascending


order. Now, insert a new card (number) into the correct position
1.E 8 L3(Apply) CO1
so that the list remains sorted. For this scenario design the
python program and also show the tracing.

PART- 2

L2
2.A Describe data types in Python with examples. 4 CO2
(Understanding)

2.B Explain operator precedence and associativity with examples. 8 L3(Apply) CO2

Explain the role of Python interpreter and the debugging L2


2.C techniques in program development. Describe each with suitable 8 CO2
(Understanding)
points.
Write a Python program to exchange values of two variables
2.D 8 L6(Design) CO2
and explain it.

2.E Write and explain a program to circulate values of n variables. 8 L6(Design) CO2

PART -3

L2
3.A Briefly describe the loop control statement- Break & Continue 4 C03
(Understanding)

Use the concept of iteration and write program:


1. Print Pattern:
*
**
3.B *** 8 L3(Apply) C03
****
*****
2. Count positive, negative, zero from a list

Define function and explain its structure. Also write a program


3.C 8 L6(Design) C03
to add two numbers using function
Consider the string, S = " python programming language "

Write a Python program to perform the following operations


using only string methods:

1. Remove the leading and trailing spaces from the string.


2. Convert the string to uppercase and lowercase.
3. Find the length of the modified string.
3.D 4. Count the number of times the character 'a' appears in the 8 L6(Design) C03
string.
5. Check whether the word "programming" exists in the
string.
6. Replace the word "language" with "course".
7. Convert the string into a list of words.
8. Reverse the string using string slicing.

3.E Write and explain binary search algorithm using python 8 L3(Apply) C03

You might also like