0% found this document useful (0 votes)
12 views12 pages

Python Programming Practical File

This document is a practical file for a Python programming course submitted by Laksh Chikara as part of the Bachelor of Computer Applications program. It contains a series of programming questions that require writing Python programs to perform various tasks, such as calculating days between dates, checking for even or odd numbers, generating lists and tuples, and identifying palindromes. The file is dated October 2025 and is associated with the School of Computer Applications at Manav Rachna International Institute of Research and Studies.

Uploaded by

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

Python Programming Practical File

This document is a practical file for a Python programming course submitted by Laksh Chikara as part of the Bachelor of Computer Applications program. It contains a series of programming questions that require writing Python programs to perform various tasks, such as calculating days between dates, checking for even or odd numbers, generating lists and tuples, and identifying palindromes. The file is dated October 2025 and is associated with the School of Computer Applications at Manav Rachna International Institute of Research and Studies.

Uploaded by

lakshchikara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PRACTICAL FILE

OF

PYTHON PROGRAMMING

BACHELOR OF COMPUTER APPLICATIONS (BCA)

Submitted by:

Name: LAKSH CHIKARA


(Roll No): 24/SCA/BCA(AI-ML)/035

School of Computer Applications


Manav Rachna International Institute of Research and Studies
(DEEMED TO BE UNIVERSITY)
Sector-43, Aravalli Hills
Faridabad – 121001

October 2025
Ques: 1) Write a Python program to calculate number of days between two dates. Sample dates:
(2014, 7, 2), (2014, 7,11) Expected output : 9 days.
Ques:2) Write a Python program that accepts an integer (n) and computes the value of n+nn+nnn.
Ques:3) Ask the user for a number. Depending on whether the number is even or odd, print out an
appropriate message to the user. Hint: how does an even / odd number react differently when
divided by 2?
Ques:4) Write a Python program which accepts a sequence of comma-separated numbers from user
and generate a list and a tuple with those numbers.
Ques:5) Write a Python program to calculate the sum of three given numbers, if the values are equal
then return thrice of their sum.
Ques:6) Write a Python program to test whether a passed letter is a vowel or not
Ques:7) Take a list, say for example this one:

a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]

and write a program that prints out all the elements of the list that are less than 5.
Extras:

a) Instead of printing the elements one by one, make a new list that has all the elements less
than 5 from this list in it and print out this new list.
b) Write this in one line of Python.
c) Ask the user for a number and return a list that contains only elements from the original
list a that are smaller than that number given by the user.
Ques:8) Create a program that asks the user for a number and then prints out a list of all the
divisors of that number. (If you don’t know what a divisor is, it is a number that divides evenly into
another number. For example, 13 is a divisor of 26 because 26 / 13 has no remainder.)
Ques:9) Take two lists, say for example these two:

a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]

b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]

and write a program that returns a list that contains only the elements that are common between
the lists (without duplicates). Make sure your program works on two lists of different sizes.
Ques:10) Ask the user for a string and print out whether this string is a palindrome or not. (A
palindrome is a string that reads the same forwards and backwards.)
Ques:11) Let’s say I give you a list saved in a variable: a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]. Write
one line of Python that takes this list a and makes a new list that has only the even elements of this
list in it.

You might also like