Semester : S1 and S2
Year : 2016
Term : JUN
Branch : MECHANICAL ENGINEERING
Scheme : 2015 Full Time
Course Code : BE 101-05
Page:2
b) What are the translator softwares used for converting a program written in a high-level
language to object code? How are they different from each other? (3)
18. Write the algorithm and flow chart to find the sum of digits of a number (8)
19. Explain the difference between definite Iteration and indefinite(infinite) iteration. Give
example programs for illustrating each type (8)
20. a) Write a program to generate Fibonacci series upto a limit ` (4)
b) What is recursion? Write a recursive function to find the factorial of a number. (4)
21. Write a Python program using function to check the type of a triangle (Scalene, Isosceles,
22.
23.
24.
Equilateral) by getting the vertices from the user. (8)
Answer any 2 complete questions each having 14 marks
a)Write a Python code to add two matrices using list (8)
0) Write a Python program to reverse a string and print whether its palindrome or not. (6)
a) A book shop details contains the Title of book and Number of copies of each title. As
books are added to shop the number of copies in each should increase and as books are sold the
number of copies in each should decrease. Implement this scenario using Dictionary data type
in Python (7)
b) Describe the use of try-except method in Python with suitable illustration. (7)
a) Write a python code to read a text file ,copy the contents to another file after removing the
blank lines (8)
b) Write notes on Class, Attributes and Instances with suitable examples for each. (6)