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

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

MUMBAI UNIVERSITY

Subject: PROGRAMMING WITH PYTHON

Semester: 1

(Time: 21/4 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.
5) Assume suitable data wherever required.
____________________________________________________________________________________________________________________________

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

a) Multiple Choice Questions.

1) <>, <=are ___________________  operators.
i) Arithmetic      ii) Logica           iii) Relational     iv). Assignment

2) Which of the following function converts a string to all lowercase?
i) lower()           ii) isdecimal       iii) swapcasi    iv) title() 

3) Python is ____________ language.
i) Compiled      ii) Procedures    iii) Interpreted.  iv) Non-Iriteractive

4) What is the output of len([“Hello”,”world”,”Python”)]?
i) 1                    ii) 2                  iii) 3                   iv) 4

5) What is “Hello” replace(“1”, “e”)
i) Heeeo           ii) Hlllo            iii) Heleo            iv) None of these

 

B) Fill in the blanks.

1) What is the data type of the below objeet ________________.
L = [11, 22, ‘hello’1]

2) Arithmetic operator (%) is used for ___________________.

3) The term IDLE stands for _____________.

4) to use in-built mathematical functions we need to import __________________  module.

5) An instance of a class is called as _________________.

 

C) Write answer for the following in few lines.

1) Define Assignment statement.

2) Write the use of del statement.

3) What is the output when the following statement is executed _______________ >>>a”+b”.

4) Define Expression statement.

5) Explain the use of “pass” statement.

 

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

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

b) What is variable? What are the rules and conventions for declaring a Variable?

c) Explain any five arithmetic operators in Python.

d) Write a short note on tuple.

e) Define Function. Write the syntax to define function Give example of function definition.

f) Write a program to calculate Simple Interest. Take Principal amount rate of interest and number of years from the user. (Hint) Simple interest= (Principal amount* Rate of interest* Number of years)/ 100)

 

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

a)  How do we implement if condition? Explain with an example?

b) Discuss the difference between local and global variables?

c) What is actual and format parameter? Explain the difference along with.

an example.

d) Explain continue statement?

e) What is nested loop? Explain with example?

f) Write a program to print factorial of a number. Take to put from user.

 

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

a) Discuss Anonymous Function?

b) Explain. Dictionary concept.

c) Define Built-in functions. Listi any a built-in functions. Explain dir() functions.

d) Write a program to create an anonymous function to calculate cube of a number?

e) What is List? Explain with example? 

f) Write a short note on class.

 

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

a) Discuss Operator Precedence along with an example.

b) Explain Random module and its function.

c) What is a comment? Why we need it? How do we implement it?

d) Write a python program to take a string from user and count number of vowel present in it

e) Explain for loop with example.

____________________________________________________________________________________________________________________________

 

 

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