Siddaganga Institute of Technology, Tumakuru - 572 103: Usn 1 S I 3MCA05

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

USN 1 S I 3MCA05

Siddaganga Institute of Technology, Tumakuru – 572 103


(An Autonomous Institution affiliated to VTU, Belagavi, Approved by AICTE, New Delhi)

Third Semester Master of Computer Applications Examinations Dec. 2017


Programming with PYTHON
Time: 3 Hours Max. Marks: 100
Note : 1. Question No. 1 is Compulsory.
2. Answer any 4 full questions from question No. 2 to Question No. 6.

1 a) Write a variable name with Camelcase naming method.


b) What is the outcome of the following code
a, b = 3, 2
s = b/1a
print(s)
c) Write an example for multiline comments
d) How do you draw an octagon with the help of a circle by using turtle?
e) How do you break a long statement into multiple lines?
f) Write the outcome for the following code:
if 3-3:
print (“It’s worst”)
else:
print (“It’s great”)
g) What is the outcome of the following code
print(‘Python”, end = ‘$’)
print(“programming”, end = ‘***’)
h) How do you fill the shape with colors?
i) How do you generate a random integer number from 0 to 50?
j) Define Unicode with an example. 1  10
k) Write the command for converting string to list of strings without$.
mystring = “Welcome $ to $ the $ world $ of $ python $ programming”
ℓ) Write a code snippet to check whether the enlered number is “Odd” or “Even” by using
conditional expression.
m) Define class with an example.
n) How do you create an empty tuple and a tuple with one integer number?
o) What will be the outcome of the following code?
mylist = [1, 4, 7, 9, 2, 6, 9, 2, 10, 5, 3]
for i in range (1, 8);
mylist[i] = mylist[i-1]
print(mylist) 25

2 a) Explain all the standard data types used in python programming language with example. 8
b) Write a python program which will find all such numbers which are divisible by 7 but are not
a multiple of 5, between 2000 and 3500 (both the numbers are included). 4
c) Explain break and continue statements in python programming language. 4
d) Write a python code to display Olympic symbol by using turtle function. 4

-1- Please Turn Over


-2- 3MCA05
3 a) Write a python program to find first 50 prime numbers using functions. 6
b) Write a python program to access the private member of a class. 6
c) Discuss the concept of inheritance in python programming language with an example. 8

4 a) Differentiate between lists and tuples and also discuss the functions that are not supported by
tuples. 8
b) Explain four built in functions of dictionary data type. 8
c) Write a python program that accepts a comma separated sequence of words as input and
prints the words in a comma-separated sequence after sorting them alphabetically. 4

5 a) Explain the different ways of constructing exception handling in python programming


language with necessary code snippets. 12
b) Discuss all the file accessing modes and also write a python program to count and display the
keywords from a python source file. 8

6 a) Explain any four widget usages of Graphical User Interface(GUI) design in python
programming language 8
b) Write a python program that creates a form to accept employee details and display the details
in the command prompt from the form using tkinter. 12
________

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy