0% found this document useful (0 votes)
5 views2 pages

Set 2

This document outlines the end-semester examination for the B.Tech II Semester in Computer Science and Engineering (Cyber Security) at St. Vincent Pallotti College of Engineering & Technology. It includes instructions for candidates, a list of questions covering various Python programming topics, and specifies the marks allocated to each question. The exam duration is 3 hours, and it consists of compulsory and optional questions related to Python programming concepts, data types, control structures, and functions.

Uploaded by

pmahakalkar
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)
5 views2 pages

Set 2

This document outlines the end-semester examination for the B.Tech II Semester in Computer Science and Engineering (Cyber Security) at St. Vincent Pallotti College of Engineering & Technology. It includes instructions for candidates, a list of questions covering various Python programming topics, and specifies the marks allocated to each question. The exam duration is 3 hours, and it consists of compulsory and optional questions related to Python programming concepts, data types, control structures, and functions.

Uploaded by

pmahakalkar
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/ 2

St.

Vincent Pallotti College of Engineering & Technology


(An Autonomous Institute)
B.Tech II Semester COMPUTER SCIENCE AND ENGINEERING (CYBER
SECURITY)
End Sem Examination
Course:- Programming in Python Course Code:- 24CS203T
Duration:- 3 Hours Max. Marks:- 60
--------------------------------------------------------------------------------------------------------------

Instructions to Candidate 1) Question No. 1 is compulsory.


2) Solve Que. No. 2 OR Que. No. 3
3) Solve Que. No. 4 OR Que. No. 5
4) Solve Que. No. 6 OR Que. No. 7
5) Solve Que. No. 8 OR Que. No. 9
6) Solve Que. No. 10 OR Que. No. 11
7) All Questions carry marks as indicated
8) Use of Non Programmable calculator is allowed.

Q.No. Description of Question Marks [CO [BTL]


]
1(a) Explanation-2M 2 1 1
1(b) Explain basic data types in python. 2 2 1
1(c) What will be the output of following code? 2 3 1
c_is_awesome = ['Python', 'is' , 'popular' , 'programming' ,
'language']
print(c_is_awesome [2:4])
print(c_is_awesome[-5])
1(d) What will be the output of following code? 2 4 1

x = {1,2,5,15}
y = {10,15,20,25,30}
z = x.symmetric_difference(y)
print(z)
x.symmetric_difference_update(y)
print(x)
1(e) Give the output of following code? 2 5 1

for letter in 'Python':


if letter == 'o':
pass
print ('This is pass block')
print ('Current Letter :', letter)
print ("Good bye!")

2(a) Explain variables in python? Explain rules required to create a 5 1 2


variable
2(b) Write the following python programs. 5 1 2
a. Exchange the value of two variable witout using of
third variable.
b. Test whether a given year is leap year or not
3(a) What are arithmetic operators in Python? What is precedence 5 1 1
of operators?
3(b) Explain if, else if, else statement with example. 5 1 2
4(a) Write a program to print the following pattern using loops 5 2 2
and/or conditional statements.
1
12
123
1234
4(b) Write an Algorithm and program to check whether a number is 5 2 2
an palindrome number?
5(a) Draw a flowchart to check if a person is eligible to vote or not? 5 2 2
5(b) Elaborate the purpose of else clause in an if-elif-else statement. 5 2 2
How can you exit a loop prematurely in python? Explain with
example.
6(a) Write a program to show iteration through a tuple in python. 5 3 1
6(b) Discuss Tuple, how to unpack a tuple. Explain with examples. 5 3 2
7(a) Write a program to explain append, insert and extend methods 5 3 2
in lists.
7(b) Discuss string datatype with its methods. 5 3 2
8(a) Demonstrate various Set methods with examples. 5 4 2
8(b) Given two sets: 5 4 3
set1 = {40, 35, 55, 60, 75}
set2 = {35, 45, 55, 65, 75}
write and explain programs to:
A: Return a new set of identical items from two sets
B: Get Only unique items from two sets
C: Remove items from set1 that are not common to both set1
and set2
9(a) Define dictionary? Explain at least 4 methods with examples. 5 4 2
9(b) Write a program to create a Dictionary named “First Year” that 5 4 2
has percentage of 5 students. Find and print average percentage
of class.
10(a) Discuss parameter passing and function arguments in 5 5 2
python
10(b) Elaborate any five built in functions in python. 5 5 2
11(a) Explain the syntax of defining a function, function definition 5 5 2
and calling a function which is suitable example
11(b) Briefly explain about scope of variables: local and global 5 5 2
variables.

You might also like