Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
7 views

Python Programming

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

Python Programming

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

Code No.

: 18ITO02
CHAITANYA BHARATHI INSTITUTE OF TECHNOLOGY (Autonomous)
B.E. (ECE) VII Sem (Main & Backlog) Examination December 2022
Python Programming
Time: 3 Hours Max Marks: 70
Note: Answer all questions from Part - A and Part – B at one place in the same order.

Part – A (20 Marks)


M CO BT
1 How multiple values can be assigned to multiple variables in Python in one (2) 1 1
line? Give example.
2 How Boolean variables are used in Python? (2) 1 1
3 How a function is defined using the def keyword in python programming. (2) 2 1
4 List various functions used for file handling in python. (2) 2 1
5 Illustrate the use of in operator in Lists. Give example. (2) 3 2
6 What is Serializing Objects? (2) 3 2
7 What is a regular expression? (2) 4 2
8 What is exception? List various keywords to handle exception. (2) 4 2
9 Distinguish between Radio Button and Check Button? (2) 5 3
10 List different types of Plots available in python. (2) 5 1

Part – B (50 Marks)


M CO BT
11 (a) Write python code to print perfect square numbers between m and n. (5) 1 3
(b) Explain conditional statements available in Python? Give syntax and (5) 1 2
example script for the same.
(OR)
12 (a) Distinguish Identity Operators and Membership Operators in Python (5) 1 3
using suitable code snippets.
(b) How complex numbers are represented in Python Programming. (5) 1 2
Discuss how multiple values are stored using Tuple.

13 (a) Explain with suitable examples to perform reading and writing (5) 2 2
operations to files.
(b) Write a python program using functions for Generating Random (5) 2 3
Numbers.
(OR)
14 (a) Write a python program to convert uppercase to lowercase and vice (5) 2 3
versa using functions.
(b) Count number of alphabets, digits and special symbols in a text file (5) 2 3
using file handling functions.

15 (a) Write a program to search for a part of string with in a list. (5) 3 3
(b) Identify various operations over Lists using Python Script. (5) 3 4
(OR)

Page 1 of 2
Code No.: 18ITO02
16 (a) Discuss various methods used for List operations and give suitable (5) 3 3
example for at least 5 methods.
(b) Write a python program to find factorial of ‘n’ using recursion. (5) 3 3

17 (a) Write a python program to create user defined exception using (5) 4 3
keywords try, catch, except, else, finally, raise.
(b) Explain the functions findall() and finditer() for regular expressions. (5) 4 2
(OR)
18 (a) Write python program to demonstrate working with instances. (5) 4 3
(b) What is the difference between Object and Class? Write a python (5) 4 3
program to create customized exception on receiving negative value
while receiving student marks.

19 (a) Write a program to receive data from UI for driving license. (5) 5 3
(b) Draw Histogram for temperature of various cities in Python. Data to be (5) 5 3
imported from CSV file.
(OR)
20 (a) Write a program to receive data from UI for voter card. (5) 5 3
(b) Draw Bar Plot for % of votes poled in different boots. Data to be (5) 5 3
imported from CSV file.
******

Page 2 of 2

You might also like