Semester : S1 and S2
Year : 2021
Term : MAY
Branch : MECHANICAL ENGINEERING
Scheme : 2015 Full Time
Course Code : BE 101-05
Page:2
19
20
21
22
23
24
a)
b)
a)
b)
a)
b)
a)
b)
a)
b)
0100BE10105022103
Write a python program to reverse a number and also find the sum of digits of
the number. Prompt the user for input
Write a python code to display multiplication tables from 1 to a given number
N
Find nCr = n!/r!(n-r)! Use recursive functions. ( 11 and r are given)
Illustrate with example any three control statements in python
Write a menu driven python program to implement a calculator. (With basic
arithmetic functions calculate square and square roots also)
Demonstrate with examples the usage of user defined functions in python.
PART C
Answer any two full questions. Each carries 14 Marks
Input two 2x2 matrices A,B. Find 2A+B. Use list in python
Explain with examples any three dictionary operations in Python.
Write a Python program to create a dictionary of names and marks of five
students. Display the names in the dictionary in the decreasing order of marks.
Write a Python program to input a sentence and perform the following
operations.
i) Find the number of words and characters in the sentence (3)
ii) Reverse each word in the sentence and save the new sentence to a file (5)
iii) Capitalize first letter of each word and store the words in a list (6)
What is object-oriented programming? Write a Python class named Circle
constructed by a radius and two methods which will compute the area and the
perimeter of a given circle.
How exceptions are handled in python?
Page 2 of 2
(4)
(4)
(4)
(4)
(6)
(2)
(7)
(7)
(14)
(12)
(2)