0% found this document useful (0 votes)
67 views9 pages

Viva Model Lab QSTN

The document is a model laboratory examination for the course "Basics of Python Programming" for B.Tech ECE students. It contains 21 questions mapped to various course outcomes of the course. The questions cover fundamental Python concepts like data types, operators, functions, modules, conditionals, loops, strings, lists, recursion etc. and require students to write small Python code snippets/programs.

Uploaded by

rawon gyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views9 pages

Viva Model Lab QSTN

The document is a model laboratory examination for the course "Basics of Python Programming" for B.Tech ECE students. It contains 21 questions mapped to various course outcomes of the course. The questions cover fundamental Python concepts like data types, operators, functions, modules, conditionals, loops, strings, lists, recursion etc. and require students to write small Python code snippets/programs.

Uploaded by

rawon gyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

ECE/Exam Cell/002

Regular/Retest
SCHOOL OF ELECTRICAL & COMMUNICATION
DEPARTMENT OF ECE

VTU R 2015

MODEL LABARATORY EXAMINATION


B.Tech. - ECE
Course Category: Program Elective Duration: 2 Hrs 30 Mins
Course Code/Course Title: 1152EC256/Basics of Python Programming Max. Marks: 15
Semester: Summer Date of Exam: 19/12/20
Section : B
Achievable Course Outcomes
CO1: Develop and illustrate algorithms to solve simple mathematical problems - S 3 Level

CO2: Write programs using various data types, operators, functions and modules in Python - S3 Level

CO3: Distinguish conditional and loop statements in Python and identify data handling functions to solve a
given problem - S 3 Level

CO4: Use appropriate data structures in python to represent compound data - S3 Level

CO5: a. Apply basic operations on data from/to files, modules and packages in Python
b. Choose appropriate error and exception handling methods for debugging - S3 Level

Questions
Course
Q. No. Outcom VTU Number
e

a
What is indexing and types of indexing? 1
vtu10585
1 b What is interpreter? 1

c What are the two modes of python? 1

a List the features of python. 1

vtu11101
b List the applications of python 1
2

c How to get data types in compile time and runtime? 1

a What is value in python? 1 vtu11102


3

CC HOD
ECE/Exam Cell/002
Regular/Retest
SCHOOL OF ELECTRICAL & COMMUNICATION
DEPARTMENT OF ECE

VTU R 2015

b What is identifier? and list the rules to name identifier. 1

c What is keyword? 1

1
a
Give the operator precedence in python.
vtu11267
4 b List out the operations on strings. 1

c Explain slicing? 1

a Explain below operations with the example 1


(i)Concatenation (ii)Repetition
Give the difference between list and tuple 1 vtu11383
b
5

c Differentiate Membership and Identity operators. 1

a Compose the importance of indentation in python. 1

b Evaluate the expression and find the result 1 vtu11420


6
(a+b)*c/d a+b*c/d
c Write a python program to print ‘n’ numbers. 1

a Define function and its uses 1


vtu11421
7
b Give the various data types in Python 1

c Assess a program to assign and access variables. 1

a Select and assign how an input operation was done in 1


python. vtu11422
8 b Discover the difference between logical and bitwise 1
operator.
c Give the reserved words in Python. 1

CC HOD
ECE/Exam Cell/002
Regular/Retest
SCHOOL OF ELECTRICAL & COMMUNICATION
DEPARTMENT OF ECE

VTU R 2015

a Give the syntax for variable length arguments. 1

9
b Define the scope and lifetime of a variable in python. 1 vtu11432

c Point out the uses of default arguments in python 1

a Generalize the uses of python module. 1

b Demonstrate how a function calls another function. Justify 1


vtu11444
10 your answer.
c List the syntax for function call with and without 1
arguments.
a Define recursive function. 1

b What are the two parts of function definition? give the 1 vtu11450
11 syntax.
c Point out the difference between recursive and iterative 1
technique.
a What is local and global scope? 1

b What are Boolean values? 1


vtu11531
12

c Define operator and operand? 1

a Write the syntax for if with example? 1

b Write the syntax and flowchart for if else. 1 vtu11533


13

c Write the syntax and flowchart for chained if. 1

14
a Define state 1 vtu11539

b Write the syntax for while loop with flowchart. 1

c Write the syntax for for loopwith flowchart. 1


CC HOD
ECE/Exam Cell/002
Regular/Retest
SCHOOL OF ELECTRICAL & COMMUNICATION
DEPARTMENT OF ECE

VTU R 2015

a Differentiate break and continue. 1

15
b Mention the use of pass 1 vtu11592

c What is fruitful function 1

a What is void function 1

16
b Mention the different ways of writing return statement 1 vtu11593

c What is parameter and list down its type? 1

1
a
Define string. How to get a string at run time.
vtu11603
17 b Differentiate local and global variable? 1

c What is function composition, give an example? 1

a Define recursion. 1

18
b Differentiate iteration and recursion. 1 vtu11751

c Define string module? 1

a What is slicing? Give an example. 1

b What is immutability of string? 1 vtu11783


19

c List out some string built in function with example? 1

1
a
What is slicing?
vtu12123
20 b How can list act as array? 1

c Write a program to check the number is odd or even. 1

21 a Write a program to check the number positive or negative 1 vtu12173

CC HOD
ECE/Exam Cell/002
Regular/Retest
SCHOOL OF ELECTRICAL & COMMUNICATION
DEPARTMENT OF ECE

VTU R 2015

b Write a program to check the year is leap year or not 1

c Write a program to find greatest of two numbers 1

a Write a program for checking eligibility for vote 1

22
b Write a program to find sum of n numbers 1 vtu12372

c Write a program to find factorial of given numbers 1

a Write a program to find sum of digits of a number 1


vtu12379
b Write a program to reverse the given number. 1
23
c Write a program to check the given number is palindrome 1
or not.
a Write a program to check the given number is Armstrong 1
or not
b how can you use for loop in sequence. 1 vtu12432
24

c how can you use else statement if loops. 1

a What is the use of map() function? 1

1
b vtu12443
25 How can we distinguish between tuples and lists?

c How can list act as array? 1

26 1 vtu12549
a
What is a Dictionary in Python

b What will be the output of the given code? 1


a. List=[‘p’,’r’,’i’,’n’,’t’,]
b. Print list[8:]

CC HOD
ECE/Exam Cell/002
Regular/Retest
SCHOOL OF ELECTRICAL & COMMUNICATION
DEPARTMENT OF ECE

VTU R 2015

c Give the syntax required to convert an integer number into 1


string?
a List is mutable. Justify? 1

27
b Difference between del and remove methods in List? 1 vtu12735

c Difference between pop and remove in list? 1

a How are the values in a tuple accessed? 1

28
b Write a python program using list looping 1 vtu12740

c Define list comprehension 1

a What is squeezing in list? give an example 1


vtu12869
29 b What do you meant by mutability and immutability? 1

c Define Histogram 1

a Define Tuple and show it is immutable with an example. 1

30
b State the difference between aliasing and cloning in list 1 vtu12993

c What is list cloning 1

a What is deep cloning 1

31
b State the difference between pop and remove method in list 1 vtu13156

c Create tuple with single element 1

a Swap two numbers without using third variable 1


vtu13158
32
b Define properties of key in dictionary 1

c How can you access elements from the dictionary 1

33 a Difference between delete and clear method in dictionary 1 vtu13164

b How to convert a tuple in to list 1

CC HOD
ECE/Exam Cell/002
Regular/Retest
SCHOOL OF ELECTRICAL & COMMUNICATION
DEPARTMENT OF ECE

VTU R 2015

c How to convert a list in to tuple 1

a What is the use of map () function. 1

34
b Create a list using list comprehension 1 vtu13165

c Advantage of list comprehension 1

a Point out different modes of file opening 1


vtu13189
35
b How can you return multiple values from function? 1

c What is sorting and types of sorting 1

a Find length of sequence without using library function. 1

36
b How to pass tuple as argument 1 vtu13190

c How to pass a list as argument 1

a What is parameter and types of parameter 1

37
b How can you insert values in to dictionary 1 vtu13191

c What is key value pair 1

a Mention different data types can be used in key and value 1

What are the immutable data types available in python 1 vtu13212


38
b

c What is the use of fromkeys() in dictioanary. 1

a Differentiate text file and binary file. 1

b Distinguish between files and modules 1 vtu13381


39

c List down the operations on file. 1

CC HOD
ECE/Exam Cell/002
Regular/Retest
SCHOOL OF ELECTRICAL & COMMUNICATION
DEPARTMENT OF ECE

VTU R 2015

a List down some inbuilt exception. 1

b Define read and write file. 1 vtu13591


40

c Differentiate write and append mode. 1

a Describe renaming and remove 1

Discover the format operator available in files. 1 vtu14367


41
b

c Explain with example the need for exceptions 1

a Explain built in exceptions 1

b Difference between built in exceptions and handling 1 vtu14385


42
exception
c Write a program to write a data in a file for both write 1
and append modes.
a How to import statements? 1

b Express about namespace and scoping. 1 vtu14390


43

c Difference between global and local. 1

a Identify what are the packages in python 1

vtu14647
b Examine buffering. 1
44

c Discover except Clause with Multiple Exceptions 1

45 a Differentiate mutable. 1 vtu14718

CC HOD
ECE/Exam Cell/002
Regular/Retest
SCHOOL OF ELECTRICAL & COMMUNICATION
DEPARTMENT OF ECE

VTU R 2015

b What is mean by problem solving? 1

c List down the problem solving techniques? 1

a Define algorithm? 1

46
b What are the properties of algorithm? 1 vtu14772

c List down the equalities of good algorithm? 1

a Define statements? 1
vtu14942
47
b Define state? 1

c What is called control flow? 1

S1- Imitation S2- Manipulation S3-Precision S4-Articulation S5-Naturalisation

CC HOD

You might also like