Semester : S1 and S2
Year : 2017
Term : JULY
Branch : MECHANICAL ENGINEERING
Scheme : 2015 Full Time
Course Code : BE 101-05
Page:2
110285 Pages: 2
PART B
Answer any 4 complete qyestions, each having 8 marks.
a) Describe the Von-Neumann architecture. (4)
b) Explain the memory hierarchy used in the computer storage with a diagram. (4)
Design an algorithm that accepts a positive integer “ന് and print all prime numbers
up to ന്. Also draw the flowchart. (8)
a) Write a python program to find the sum of digits of a given positive integer. (4)
b) Write a program to print the following pattern ۱
1
23
456 (4)
a) Write a program using function to display a multiplication table of n*n size.
for any given സ്. (5)
b) Compare the built-in functions int() and str() with examples. (3)
a) Write a program using function to find the binomial coefficient, "C,. (4)
[Note: °C, =n! /r!*(n-r)!]
b) Write a program that accepts the length of three sides of a triangle as input and
determine whether or not the triangle is a right triangle. (4)
PART C
Answer any 2 complete questions, each having 14 marks.
a) Write a program to perform the following operations on a given string. (7)
i. convert all small letters in a string into capital letters.
11. find the number of occurrences of a given substring.
b) How to create a Dictionary in Python? Write a Python program to read and
display a sparse matrix using dictionary. (7)
a) Write a program to read numbers stored in one file and store the sorted numbers
in another file after deleting duplicates. (7)
0) Create a class “1800180216” with attributes length and breadth and method area()
for calculating the area of the rectangle. Create two instances of the class and call
the method for each instance (7)
a) Write a program to sort a list of names in alphabetical order and print the sorted
list in uppercase. (7)
b) How exceptions are handled in Python? Illustrate with example. (7)
೫೫%
Page 2 of 2 i