Python Programming - 29-3-2018
Python Programming - 29-3-2018
PARUL UNIVERSITY
FACULTY OF IT & COMPUTER SCIENCE
Parul Institute of Computer Application
Bachelor of Computer Application
2017–18 Mid Semester Examination
Semester: 2 Date: 29/03/2018
Subject Code: 05101155 Time: 10:00 to 12:00
Subject Name: Python Programming Total Marks: 40
Instructions:
1. Figures to the right indicate full marks.
2. Make suitable assumptions wherever necessary.
1 of 1
7) What arithmetic operators cannot be used with strings?
a) + b) *
c) ** d) b & c
Q.2 Answer the following.
(a) [4]
1) Explain the use of ‘in’ operator in string giving example.
2) What are Modulus Operator and Boolean Expression? Explain giving example.
(b) [6]
1) What are Complier and Interpreter? Explain interpreter in Detail.
2) Justify the statement “Strings are immutable”.
Q.3 Attempt any TWO.
1 What are Errors? List and explain the different types of errors. [5]
2 List the operators precedence. Solve the following Program using operator precedence. [5]
e = (a + b) * c / d
print "Value of (a + b) * c / d is ", e
e = ((a + b) * c) / d
print "Value of ((a + b) * c) / d is ", e
e = (a + b) * (c / d);
print "Value of (a + b) * (c / d) is ", e
e = a + (b * c) / d;
print "Value of a + (b * c) / d is ", e
3 What is Chained execution? Write a program to find number is Largest among three number [5]
using Chain Condition.
OR
(b) What is Alternative Execution? Write Syntax and Draw Flow Charts. [5]
2 of 1