Wa0002 PDF
Wa0002 PDF
ary examination timetable june/july 2016::: KTU B.Tech Transfer Details Published::: Model Question for
Class Gmat »
info.com
PART A
ANS:
ANS:
USB
DVI
The DVI port is used for video on newer
monitors.
Network/Ethernet (RJ-45)
ANS:
ANS:
It is a unidirectional bus.
ANS:
ktubtechquestions.com
ANS:
Top-down Approach
Bottom-up Approach
ANS:
Step 1: Start
begin
pwr ← pwr + 2;
s ← s * (-1);
nr ← nr * x1 * x1;
i ← i + 2;
end
Step 8: Stop
ANS:
A_123
ANS:
2**3**2 = 64
print i
ANS:
10,8,6,4,2,0
ANS:
beg = 0
end = 0
sum = 0
n=0
beg = input()
end = input()
n = beg
if ( (n % 2) == 1):
n += 1
sum += n
n += 2
ANS:
log()
math.log(x,[ base])
(x)/log(base).
math.log1p(x)
math.log10(x)
cosine()
math.cos(x)
ANS:
Def check(x,y):
If y ==0;
Print ‘error’
Return
Else:
Return x/y
a,b =10,5
Print check(a,b)
ANS:
def recur_fibo(n):
“””Recursive function to
if n <= 1:
return n
else:
return(recur_fibo(n-1) + recur_fibo(n-2))
# take input from the user
if nterms <= 0:
else:
for i in range(nterms):
f= recur_fibo(i)
ANS:
fruit=’apples’
i) len(s1)=6
ii) s1[0:4]=apple
iii) s1[6]=s
iv) s1[-4]=p
ANS:
list=[‘circle’,’square’,’triangle’]
i) list[0] = ‘ellipse’
ii) append(‘rectangle’)
iii) list.remove(‘square’)
iv) remove(‘triangle’)
13.Let Farm={‘Sheep’:5,’cows’:2,’goats’:10}
be a dictionary . write the statements for
following operations. (3)
farm={‘Sheep’:5,’cows’:2,’goats’:10}
i) farm[‘Ducks’] =8
ii) len[farm]
iii)del farm[‘cows’]
>>> print f
python script.
import pickle
import pickle
file_Name = “testfile”
fileObject = open(file_Name,’wb’)
pickle.dump(a,fileObject)
fileObject.close()
fileObject = open(file_Name,’r’)
b = pickle.load(fileObject)
a==b
True
stored.
Handling an exception
elegantly as possible.
Syntax
try:
operations here;
………………….
except ExceptionI:
except ExceptionII:
………………….
else:
PART B
ktubtechquestions.com
FETCH
DECODE
EXECUTE
CHARACTERISTICS: of OMR
Handwritten characters
Printed characters
APPLICATION: of OCR
APPLICATION: of OCR
Over OMR
DISADVANTAGE: of OCR
APPLICATION: of MICR
Bank cheques
DISADVANTAGES: of MICR
Algorithm:
deffind_max (L):
max=0
min = 0
forxinL:
ifx>max:
max=x
returnmax
forxinL:
ifx<min:
min=x
return min
19
… if n % x ==0:
… print n, ‘equals’, x, ‘*’, n/x
… break
… else:
… if num %2==0:
… continue
# initialize sum
sum = 0
# find the sum of the cube of each digit
temp = num
digit = temp % 10
sum += digit ** 3
temp //= 10
if num == sum:
print(num)
num_array = list ()
count_zero = 0
count_neg = 0
for i in range(int(num)):
n = raw_input(“num :”)
num_array.append (int(n))
if num_array[i] = 0
count_zero = count_zero + 1
Sum = 0
def Sum_Of_Digits(Number):
global Sum
Reminder = Number % 10
Sum_Of_Digits(Number //10)
return Sum
Sum = Sum_Of_Digits(Number)
21.
# define functions
return x + y
return x – y
return x / y
print(“Select operation.”)
print(“1.Add”)
print(“2.Subtract”)
print(“3.Multiply”)
print(“4.Divide”)
if choice == ‘1’:
print(num1,”+”,num2,”=”, add(num1,num2))
print(num1,”-“,num2,”=”,
subtract(num1,num2))
elif choice == ‘3’:
print(num1,”*”,num2,”=”,
multiply(num1,num2))
print(num1,”/”,num2,”=”, divide(num1,num2))
else:
print(“Invalid input”)
>>> x
[1,4,9,’new end of list’]
>>> x[2] = 16
>>> x
[1,4,16,’new end of list’]
>>> x[2:3] = [9,16,25]
[1,4,9,16,25,’new end of list’]
x = (1,”string”)
x = () # empty tuple
x = (2,) # one element tuple requires a trailing
comma (which is legal
# for any length tuple also) to distinguish them
from expressions
a = “hello world”
>>> space = ” ”
>>> nv = 0
>>> nc = 0
>>> nq = 0
>>> nw = 1
>>>for char in a:
… if char in vowels:
… nv += 1
… nc += 1
… elif char in Quest_mark:
… nq += 1
… nw += 1
>>>print nv
>>>print nw
>>>print nc
>>>print nq
count = 0
total = 0.0
cube = 0
while True:
try:
if line:
n = int(line)
count = count + 1
total = total + n
cube= n*n*n
print(‘cube:’, cube)
else:
break
print(‘cube:’, cube)
if count:
print(‘average:’, total/count)
OR
num_array = list ()
avg = 0
total = 0
n = raw_input(“num :”)
num_array.append (int(n))
cube = num_array[i] * num_array[i]*
num_array[i]
print cube
avg = total / n
print avg
… print(items)
file.close()
import string, os
def strip_punct(ifile):
exclude = set(string.punctuation)
f = open(‘newfile.txt’, ‘r’)
text = f.readlines()
f.close()
for x in xrange(0,len(text)):
s = text[x]
return op_file_path
if __name__ == “__main__”:
ifile = raw_input()
strip_punct(ifile)
attributes
1. # declare a class
2. classCar:
3. self.model = model
4. self.year=year
5. self.price=2500000
6.
7. def cost(self):
8. Return self.price
9. if __model__ ==’__main__’:
10. c=Car()#
11. Price= C.cost()
12. print”Car Info: “
13. print”model: %s”%c.model
14. print”year %s”%year
15. print”price” %d price
dataFile.write(sq)
print (datafile)
dataFile.close()
KTU SolvedQuestions
ONE COMMENT
LEAVE A REPLY
Name
Email
Website
Post Comment