0% found this document useful (0 votes)
2 views

BCA614(M)

This document outlines the BCA/Integrated VI Semester Examination for Python Programming, detailing the course code, paper ID, duration, and maximum marks. It includes a series of questions covering topics such as control statements, file handling, functions, inheritance, exceptions, and data structures in Python. Students are required to attempt all questions, with specific programming tasks and theoretical explanations to demonstrate their understanding of Python concepts.

Uploaded by

addudavid32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

BCA614(M)

This document outlines the BCA/Integrated VI Semester Examination for Python Programming, detailing the course code, paper ID, duration, and maximum marks. It includes a series of questions covering topics such as control statements, file handling, functions, inheritance, exceptions, and data structures in Python. Students are required to attempt all questions, with specific programming tasks and theoretical explanations to demonstrate their understanding of Python concepts.

Uploaded by

addudavid32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

BCA/Integrated (BCA+MCA) VI (Sixth) Semester Examination 2022-23

Course Code: BCA614 Paper ID: 08323614

Python Programming

Time: 3 Hours Max. Marks: 60

Note: Attempt all questions.

Q1. Answer the following (limit your answer to 50 words): Marks


a) Differentiate between break & continue statement in Python. 2
Or
Write a python script that reads the length and width of farmer’s field. Once the value 2
has been read the program computes and display the area of the field.
b) Write a python program to combine each line from first file with the corresponding 2
line in second file and display the result to the user.
Note: file 1.txt 1st file, file 2. Txt2nd file
Or
Discuss how functions can be used for reusability in Python. 2
c) Explain various types of inheritance possible in Python with example of each. 2
Or
What are local & global variables? 2
d) Get a dictionary name and file name as input from user. Search for the file in given 2
directory and display the result.
Or
How do you import the Math Module in Python? 2
e) What is an exception? 2
Or
Define class & object. 2
2. Write a python program that read words from the user until the user enter a blank line. 10
After the user enters a blank line the program should display each word entered by
user exactly once. The words should display in same order they were entered. For
Example:
I/P:
first
Second
First
Third
Second
O/P:
first
Second
third.
Or
a) Write a python program to check whether the given number is an Armstrong 5+5=10
number or not.
b) Write a python function to check whether a number is perfect or not. A perfect
number is a positive integer that is equal to sum of its proper possible divisors,
excluding the number itself.
3. a) Write a program using list comprehension to print Fibonacci sequence in comma 5+5=10
separated form with given ‘n’ input by console.
b) Create a function that accept two lists as its parameter as its parameters. It should
return the unique elements in both the list in a sorted order.
Or
a) Write a function to find the sum of natural number from m to n. the value of m and 5+5=10
n are passed from main module. The function should return the sum to main
module.
b) Read the collection of integers from user. Display all positive numbers, followed
by all zeros, followed by all negative numbers. Create 3 list to store positive, zero
and negative.
4. What is a dictionary? Explain some built in dictionary methods with examples. 10
Or
Explain list along with methods associated with lists. Explain mutability with respect 10
to lists.
5. What is a module in Python? Name any four modules. How do you import a module? 10
Or
What is a file? How do you perform read & write operation on a file? 10

6. How is exception handling done in Python? Appraise the use Except, Try and Finally 10
clause with example.
Or
Differentiate between operator overloading & overriding with help of a suitable 10
example.

You might also like