Semester : S1 and S2
Year : 2019
Term : MAY
Branch : MECHANICAL ENGINEERING
Scheme : 2015 Full Time
Course Code : BE 101-05
Page:2
17
19
A1110 Pages:3
Differentiate between shallow equality and deep equality.
PART B
Answer any four full questions, each carries8 marks.
What is a bus? Give the different types of buses. With a diagram show the
interaction between CPU, memory and peripheral devices.
Formulate an algorithm and draw a flowchart to generate Fibonacci series upto 0
terms
Using compound Boolean expression write a Python program to print the
numbers which are divisible by 7 and multiples of 5 between m and n where m
and n are positive integers.
What is recursion? Write a python program to calculate nCr. Use a recursive
function fact() to find the factorial of a number.[nCr=n!/(r! x (n-r)!)]
Write a Python program to print the following output:
ಜೇ
ےد
नै नैः *
لہ ಜೇ
*
PART C
enantiomer sper any-twofull-questions, ९017 റിപ്ലെ ட்ட
20 a) Write a menu driven Python program to read a string and perform the following
21
22
b)
a)
b)
a)
string operations:
(i) Slice the string to two separate strings; one with all the characters in
the odd indices and one with all characters in even indices.
(ii) Replace all the spaces in the input string with * or if no spaces found,
put $ at the start and end of the string.
Explain any four file functions in Python with example.
Explain how runtime errors are handled in python.
Explain any three dictionary operations in Python. Give examples.
Write a Python program to create a dictionary of roll numbers and names of five
students. Display the names in the dictionary in alphabetical order.
Write a Python program to read a number and check for prime. If not, raise an
arithmetic error to display as not prime.
Write a Python program to read a list consisting of integers, floating point
numbers and strings. Separate them into different lists depending on the data
Page 2 of 3
(3)
(8)
(8)
(8)
(8)
(7)
(4)
(7)
(7)
(7)