Semester : S1 and S2
Year : 2017
Term : DECEMBER
Branch : MECHANICAL ENGINEERING
Scheme : 2015 Full Time
Course Code : BE 101-05
Page:1
D D7084
Total Pages: 2
Reg ೫೦.: Name:
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
FIRST SEMESTER B.TECH DEGREE EXAMINATION, DECEMBER 2017
Course Code: BE101-05
Course Name: INTRODUCTION TO COMPUTING AND PROBLEM SOLVING
Max. Marks: 100 Duration: 3 Hours
PARTA
Answer all questions. Marks
1 What is the purpose of a translator? Explain the different types of translators. (3)
2 Write an algorithm for finding the largest and smallest of N numbers. (3)
3 What do you mean by cache memory? (2)
4 Draw the flowchart for finding the sum of all even numbers between | and N (3)
5 Identify all the invalid variable names from the following. Also give the reason (2)
(02൩ (0205൪ (iii) for (1) fori
6 What will be the output of the following expressions in python (2)
i) 2*3**2 1) 02
7 Write a python function that will accept three arguments x , y and 2. Find xty (3)
and if the sum is greater than z, return the square root of (൨൧. Otherwise
return -1
8 What is the difference between type conversion and type coercion? Explain (3)
with example.
9 What will be the output of the following code (3)
for number in range(30,20,-2):
number = number + 5
print number
10 Suppose S=”mary had a little lamb”. Write the python code to (2)
i) Replace “lamb” with “kid”
ii) Find starting index of substring “had” in the string S .
1] Let data=[23,56,67,2,[6,7,12],123]. Write the expressions for following (3)
operations in Python:
i) Replace the value 67 with 89
ii) Print the value 12.
iii) Remove the value 56 from list.
12 Let t=(‘a',’b','c',1,2,3). Write a python code to print the values in reverse order. (2)
13 How can you create a fresh copy of a dictionary? Explain with example. (2)
14 What is the advantage of using pickling? Explain the “dump” and “load” (3)
methods associated with it.
15 Explain with example the difference between read() and readline() functions (2)
associated with files in python.
16 Describe the different modes used for file operations. (2)
Page 1 of 2