0% found this document useful (0 votes)
28 views3 pages

CT-3 Template

Uploaded by

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

CT-3 Template

Uploaded by

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

Roll Number : ................................................

Allenhouse Institute of Technology


176, Kulgaon Road, Rooma, Kanpur – 208008 U.P.
Class Test – III : Odd Semester 2024-25
Program : B. Tech. CS & AIML/Core Sem. : III Course Code : BCC302
Course Name : Mathematics-IV Max. Time : 120 Minutes

Course assigned to : Mr. Saurabh Prasad/Mr. Gaurav Max. Marks : 30


Tiwari/ Mrs. Shivani/Mr. Hari Mohan

CO-1 : Interpret the fundamental Python syntax and semantics and be fluent in the use of Python
control flow statements.
CO-2 : Express proficiency in the handling of strings and functions
CO-3 : Determine the methods to create and manipulate Python programs by utilizing the data
structures like lists, dictionaries, tuples and sets.
CO-4 : Identify the commonly used operations involving file systems and regular expressions.

Section – A # 12 Marks
Q.1 : Attempt any Six questions (Short/Medium Answer Type). Each question is of 2
marks.

a) Differentiate the local and global variable. CO-1

What do you mean by operator? Explain the category of operators with CO-1
b)
python program in detail.

Write a purpose to use break and continue statements, explain with CO-2
c)
examples.

What is the meaning of range function, and how to use it, explain with CO-2
d)
example?

Explain the concept of list in Python and demonstrate list slicing. (Provide CO-3
e)
examples).

f) What do you mean by inbuilt function? Explain with examples. CO-3

g) Write the difference between writeline and writelines functions. CO-4

Section – B # 18 Marks
Q.2 : Attempt any Six questions (Long Answer Type). Each question is of 3 marks.

a) CO-1

What will be the output of the following Python code?


i=0
while i< 3:
print(i)
i += 1
else:
print(0)

CO-2

Write short notes with examples:


 The programming cycle for python
b)  Elements of Python
 Type conversion in Python
 Operator precedence
 Boolean expression.

CO-2

State which of the following Python statements are valid and invalid.
1. x = input("Enter a number")

c) 2. x = input()
3. x = input("")
4. x = input(" ' ")
5. x = input(2)
6. x = input("2" + "3")

d) Write a Python program to convert time from 12 hour to 24-hour format. CO-3

e) What do you mean by type casting? Explain with suitable example. CO-3

Illustrate different list slicing constructs for the following operations on CO-4
the following
list:
L = [1, 2, 3, 4, 5, 6, 7, 8, 9]
1. Return a list of numbers starting from the last to second item of the list
f)
2. Return a list that start from 3rd item to second last item.
3. Return a list that has only even position elements of list L to list M.
4. Return a list that starts from the middle of the list L.
5. Return a list that reverses all the elements starting from element at
index
Create a Python program to read a text file and do following: CO-4
1. Print no. of lines
g)
2. Print no. of unique words
3. Store each word with its occurrence in dictionary

====================

You might also like