Professional Documents
Culture Documents
Ge - 22
Ge - 22
Question-1 is compulsory. Answer any 5 questions from Section-I and Section-II taking at least 1
from each of the section.
b) What is Register? Write the functions of various register present in control unit.
3 + (1 +4)
Section –II
4.
a) Differentiate between the following operators with the help of examples:
i) = and = =
ii) / and %
iii) / and //
iv) * and **
b) What do you mean by variables in Python? Differentiate between global variables and local
variables.
(4+(1+3))
5.
a) What is the function in Python? Demonstrate the use of different types of parameter passing in
user defined functions?
b) Write a Python Program to perform Linear Search.
((1+4)+3)
6.
a) Why do you need loops in Python programming? Make comparison between FOR and WHILE
loops in Python.
b) Write a Python program to get the biggest number from a list.
((2+3)+3)
Page 1 of 2
7.
a) What is a recursive function? Write a recursive function to find the reverse of a string. Take input
from the user.
b) Input two numbers from user and write Python program to find their GCD.
((1+4)+3)
8.
a) Discuss different data types in Python? Give examples.
b) Input a sentence from user and write a Program in Python to find number of vowels, consonants,
spaces and special characters.
(5+3)
9.
a) What do you know about control statements? Write Short note on that.
b) Write a Python program to find the repeated digits in a number using function concept.
((1+4)+3)
10. Find the output of the following codes in Python:
a) n= ‘50’
print(n+ ‘25’)
b) n=125
for i in n:
print(i)
c) List=list('string')
print(List)
d) List=[3, 4, 5, 12, 9]
print(List.pop(4))
h) L1= [1,2,[3,5]]
L1[2][1]=4
print(L1)
(8×1)
Page 2 of 2