LinkedIn Insight BSc.-Programming with Python-I-Mumbai-November 2018 - Grad Plus

BSc.-Programming with Python-I-Mumbai-November 2018


Subject: Programming with Python-I

Semester: 1

(Total Time: 2½ Hours)
[Total Marks: 75]
N.B. 1) All questions are compulsory.
2) Figures to the right indicate marks.
3) Illustrations, in-depth answers, and diagrams will be appreciated.
4) Mixing of sub-questions is not allowed.

Q. 1 Attempt All(Each of 5Marks) (15M)

a) Multiple Choice Questions. (5M)

1. 53% 24 will result in _________.
a) 5             b) 2.20833333              c) 2.20                d) 2

2. IDLE in python stands for ______________.
a) integral design language environment
b) internet development environment
c) integrated design environment
d) integrated development environment

3 Python is _____________ language.
a) Compiled  b) Procedure             c) Interpreted      d) Non-Interactive

4. The output of ‘123’+4 in python is __________.
a) 1234         b) 4                             c) 127                  d) error

5. __________statement is used when a statement is required syntactically but you do not want any command or code to execute.
a) pass          b) break                      c) continue          d) for

B) Fill in the blanks. (5M)

[Logical , Dictionary, (int) x, >>, func, Bitwise, Class, >>>, def, tuple, int(x), <<,]

1 ______________ Coverts ‘x’ into integer data type.

2 In python, prompt is shown using _____ symbol.

3 _______________ Keyword is used to define a function.

4 &&, ||, ^ are ____________ operators.

5 ______________ is not a core data type.

C) Short Answers in 1-2 sentences. (5M)

1 How do we represent empty list?

2 What is the use of del statement?

3 What is comment in python programming?

4 Give examples of assignment operators.

5 Define Expression statement.

Q. 2 Attempt the following (Any THREE) (15M)

a) What is the use of following arithmetic operators?
i) *           ii) //           iii) /            iv) %              v) **

b) Write a short note on IDLE.

c) Describe any 5 features of Python language.

d) What is the use of Math module? Write any 4 functions of it.

e) Discuss ”list” data type in regards with the following points:
i) Declaration and initialization of variable of “list” data type
ii) Displaying second element of a list.
iii) Delete third element of a list.
iv) Display all elements starting from second position in a list.
v) Repeat list twice and display it.

f) Write a program to accept percentage from user. If percentage is < 35 then print “Fail”. If percentage >=35 and < 60 print “second class”. If percentage >=60 and < 75 print “First Class”. If percentage >=75 print “Distinction”.

Q. 3 Attempt the following (Any THREE) (15M)

a) What is the use of if – elif condition? Explain with example.

b) Explain following points regarding function:
i) Definition /Use of function
ii) Syntax of function definition
iii) Example of function definition

c) Illustrate the use of range () in python along with an example.

d) Discuss the difference between local and global variables.

e) When do we use continue statement? Explain with example.

f) Write a python program to display prime numbers up to number ‘n’. Accept value of ‘n’ from user.

Q. 4 Attempt the following (Any THREE) (Each of 5Marks) (15M)

a) What is List Comprehension? Give example.

b) Give any five methods of String. Explain with example.

c) Discuss Anonymous function.

d) Describe the following terms of Object-Oriented Programming. Give example.
i) Class                   ii) Object

e) Explain any five methods of tuples with example.

f) Write a program in python to create a function using lambda to find square of a number.

Q. 5 Attempt the following (Any THREE) (Each of 5Marks) (15M)

a) What is the role of indentation in python? Provide example to support your answer.

b) Explain “for” loop using following points:
i) Use
ii) Syntax
iii) Example

c) Describe any five methods of Dictionary with example.

d) What is the difference between simple and compound statements? Explain with example.

e) Write a python program to print table of a number. Take number as an input from user.


Scroll to Top
error: Alert: Content selection is disabled!!