III - BSC - CS - &BCA - Python
III - BSC - CS - &BCA - Python
Part – A (10X1=10)
I. Choose the best answer:
1. A________ is a sequence of instructions that specifies how to perform a
computation.
a) Program b) Operator c) Array d) Variables
2. The Logical operator consists of_________
a) Two b) Three c) Four d) Five
3. Code that appears after a return statement, or any other place the flow of
execution can never reach, is called___________
a) Dead code b) Continue code c) Ready code d) Break code
4. In a computer program, repetition is also called_______
a) Iteration b) Decision making c) Array d) Operators
5. The values in a list are called______
a) Words b) Numbers c) Elements d) Characters
6. ______ is a function the takes a value (of any kind) and returns an integer.
a) Hash b) Singleton c) Lookup d) Memo
7. ______ is a built-in function that takes two or more sequences and returns a
list of tuples where each tuple contains one element from each sequence.
a) Zip b) Iterator c) Scatter d) Tuple
8. To write a file, you have to open it with mode ______ as a second parameter.
a) w b) r c) a d) o
9. Object is an instance of the__________
a) Class b) Tuples c) List d) Variable
10.Functions that work with several types are called________________
a) Polymorphic b) Inheritance c) Methods d) Object
PART - B (5X5=25)
II. Answer ALL the questions.
11. a) Compare the difference between features of formal and natural languages.
(OR)
b) Describe fruitful functions and void function with an example.
12. a) Recall Boolean function with an example.
(OR)
b) Analyze how to traversal a string with a for loop.
13.a) Examine the list are mutable give an example.
(OR)
b) Relate dictionary is a mapping.
14.a) How to pass the variable-length arguments tuples inside function?
(OR)
b) Discuss the database used in python give an example.
15.a) Summarize the various features of object oriented.
(OR)
b) Outline class diagram and write the relationship between the classes.
PART- C (5X8=40)
IV. Answer ANY THREE questions.
16.a) Define the variable name. Explain how to the expression and statement
used in python.
(OR)
b) Write a python program to find a factorial of non-negative integer number
using recursion.
17.a) Explain the while statement flow of execution.
(OR)
b) Classify how to access character and various methods used in string.
18. a) Analyze how to use the map, filter and reduce in list.
(OR)
b) Compare the difference between dictionaries and list.
19.a) Recall about list and tuples with and example.
(OR)
b) Determine the file name and path used in python.
20.a) Demonstrate a python class bank account with attributes like account
number, balance, date of opening and customer name, and method like
deposit, withdraw, and check_ balance.
(OR)
b) Explain the inheritance. How to inherit the parent class into child class
give an example?
***********