0% found this document useful (0 votes)
664 views30 pages

Python Slips

The document outlines the syllabus for a Python programming practical examination. It contains 15 slip sheets, each with instructions for 2 programming questions to be completed in 3 hours. The questions involve writing Python code to perform tasks like calculating sums, factorials, averages and manipulating data structures like strings, tuples, lists, sets and dictionaries. Students can earn a maximum of 35 marks by answering the questions and an additional 30 marks for internal assessment.

Uploaded by

Abhishek Yadav
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
664 views30 pages

Python Slips

The document outlines the syllabus for a Python programming practical examination. It contains 15 slip sheets, each with instructions for 2 programming questions to be completed in 3 hours. The questions involve writing Python code to perform tasks like calculating sums, factorials, averages and manipulating data structures like strings, tuples, lists, sets and dictionaries. Students can earn a maximum of 35 marks by answering the questions and an additional 30 marks for internal assessment.

Uploaded by

Abhishek Yadav
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 30

SavitribaiPhule S.Y.B.C.A.

(Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 1

Q1. Write a program which finds sum of digits of a number. [10]

Q2.Write a Python program to count the occurrences of given word in sentence. Accept sentence and
word from user. [ [20]

Q4. External Viva [5]


SavitribaiPhule Pune University

S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 2

Q1. Write a program to calculate the factorial of a number. [10]

Q2.Write a Python program to count frequency of each character in a given string using user

defined function. [20]

Q4. External Viva [5]


SavitribaiPhule Pune University

S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 3

Q1. Write a program which finds all factors of a number. [10]

Q2. Write a Python program to accept string and remove the characters which have odd index values of
a given string using user defined function. [20]

Q4. External Viva [5]


SavitribaiPhule Pune University

S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 4

Q1. Write a program to accept 5 numbers and calculate its Mean value [10]

Q2.Write a Python program to accept a string and from a given string where all occurrences of its first
character have been changed to '$', except the first char itself. [20]

Q4. External Viva [5]

Q5. Internal Assessment [30]


SavitribaiPhule Pune University

S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 5

Q1. Write a program which reverses a string and displays both original and reversed string. [10]

Q2.Write a program to create tuple of n numbers, print the first half values of tuple in one line and the
last half values of tuple on next line. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 6

Q1. Write a program which accepts 10 integers and prints "DUPLICATES" if any of the values entered are
duplicates otherwise prints "ALL UNIQUE". [10]

Q2. Write a Python program to create a tuple of n numbers and print maximum, minimum, and sum of
elements in a tuple. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 7

Q1. Write a program which prints fibonacci series of a number. [10]

Q2. Write a Python program to accept two lists and merge the two lists into list of tuple. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 8

Q1. Write a program which accepts an integer value 'n' and prints all prime numbers till 'n'. [10]

Q2. Write a Python program to perform operation on sets which includes union of two sets, an
intersection of sets, set difference and a symmetric difference. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 9

Q1. Write a program to count the number of characters in a string. [10]

Q2. Write a Python program to accept n elements in a set and find the length of a set, maximum,
minimum value and the sum of values in a set. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 10

Q1. Write a program to get a single string from two given strings and swap the first two characters of
each string. [10]

Sample String: 'abc', 'xyz'

Expected Output: xycabz

Q2.Write a Python program to accept n numbers in list and find sum and average of numbers in list. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 11

Q1. Write a program to find the length of a set. [10]

Q2. Write a Python program to accept n numbers in list and remove duplicates from a list.[20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 12

Q1. Write a program which finds sum of digits of a number. [10]

Q2. Write a Python script to generate and print a dictionary that contains a number (between 1

and n) in the form (x, x*x).

Sample Dictionary (n = 5)

Expected Output : {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 13

Q1. Write a program to reverse a tuple. [10]

Q2. Write a Python program to accept n numbers in list and find maximum and minimum from list. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 14

Q1. Write a program to find the repeated items of a tuple. [10]

Q2. . Write a Python program to define class to find validity of a string of parentheses, '(', ')', '{', '}', '[' and
'].These brackets must be in the correct order, for example "()" and "()[]{}" are valid but "[)", "({[)]" and
"{{{" are invalid using exception. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 15

Q1. Write a program to create a list of tuples with the first element as the number and second element
as the square of the number. [10]

Q2. Write a program to count the types of files in directory. Display the type and count.

i.e. .txt 12, .html 10 etc. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 16

Q1. Write a program to convert a tuple to a string. [10]

Q2.Write a python program to accept NxN matrix and display the same. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 17

Q1. Write a program which checks whether an element exists within a tuple. [10]

Q2.Write Python menu driven program to perform following operations on numbers:

a. Hexadecimal to Octal

b. Decimal to Octal

c. Binary to Octal [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 18

Q1. Write a program to create set difference and a symmetric difference. [10]

Q2.Write python program to accept and print string in reverse order using recursion. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University

S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21


Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 19

Q1. Write a program to accept 10 numbers and find its median [10]

Q2. Write a Python program to check if a given key already exists in a dictionary. If key exists replace
with another key/value pair. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 20

Q1. Write a program to accept 10 numbers and find its Mode [10]

Q2. Write python program using an anonymous function to find area of circle, circumference of circle.
[20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 21

Q1. Write a program to accept a number and display its first ten multiples. [10]

Q2. Write python program to make directory, change directory, list files from directory and remove
directory. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 22

Q1. Write a program to accept 10 numbers, display the sum of odd numbers and sum of even numbers.
[10]

Q2. Write a Python program to display all files in current directory along with size and mode of file. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 23

Q1. Write a program to accept a number 'n', and display the following pattern (Floyd's triangle)n=3

23

4 5 6 [10]

Q2. Write python program which provides a hint to the user so that he can figure out the correct
alphabet. The program will ask the user to enter an alphabet until they guess a stored alphabet
correctly. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 24

Q1. Write a program to display the following pattern. [10]

1234

123

12

Q2. Write python program which provides a hint to the user so that he can figure out the correct
number. The program will ask the user to enter a number until they guess a stored number correctly
using user defined exceptions. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 25

Q1. Write a program to check whether input number is divisible by 3 or 5 or both. [10]

Q2. Write python program to find factorial of numbers using recursion. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 26

Q1. Write a program to accept and convert string in uppercase or vice versa. [10]

Q2. Write python program using an anonymous function to find area of circle, circumference of circle.
[20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 27

Q1. Write a program to create list of tuples with the first element as the number and second element as
the cube of the number. [10]

Q2. Write python program that converts a temperature from Kelvin to Fahrenheit, the function bails out
if a negative temperature is entered. [Use assertion] [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 28

Q1. Write a program to check if an element exists within a tuple. [10]

Q2. Write python program to find GCD of numbers using recursion. [20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 29

Q1. Write a program to perform the add and remove operations on a set. [10]

Q2. Write python program to display the Fibonacci sequence up to nth term using recursive function.
[20]

Q4. External Viva [5]

SavitribaiPhule Pune University


S.Y.B.C.A. (Science) Practical Examination MAR/APR – 2020-21

Lab Course II

BCA : Lab II: Python Programming

Duration: 3Hrs. Max Marks: 10+20+05=35

Slip 30

Q1. Write a program to create a union of sets. [10]

Q2. Write a python program which will calculate the average of the values in list passed by the user and
the value should not be an empty list. If value is empty list, it should raise error. [Use Assertion] [20]

Q4. External Viva [5]

You might also like