Python Lab Assignment-I
Python Lab Assignment-I
Department: MCA
Academic Year: 2019-20 Session: II
Class: MCA-II Semester: IV Subject: Python Programming
Q.1) Write a Python program to display following pattern using while loop
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
Q.3) Write a python program to display prime no.s between 1 to 100 using range() function
Q.4) Write a python program to display following pattern using for loop
*
***
*****
*******
*********
Q.5) Write a python program to display entered no. is amstrong’s no. or not
Q.7) Write a python program to check accepted string is palindrome or not and display appropriate
message.
Q.11) Write a python program to display following pattern using for loop
*
**
***
****
*****
Q.13) Write a python program to do all arithmetic operations on two complex numbers
JSPM’s Jayawant Institute of Management Studies, Tathawade
Department: MCA
Academic Year: 2019-20 Session: II
Class: MCA-II Semester: IV Subject: Python Programming
Q.7) Write a python program to depict implementation of list and dictionary methods
Q.8) Write an anonymous function to calculate square of passed list of values (like map())
Q.9) Write an anonymous function to depict implementation of math functions (by passing list of
Math function )
Q.10) Write a python program to find out intersection and union of two lists
Q.11) Write a python program to find out prime nos between 1 to 10 using for-else statement
Q.12) Write a Python Program for implementation of stack and queue operations
Q.13) Write a Python Program to display train no. with multiple stations using dictionary
JSPM’s Jayawant Institute of Management Studies, Tathawade
Department: MCA
Academic Year: 2019-20 Session: II
Class: MCA-II Semester: IV Subject: Python Programming
Q.5) Write a function to search a entered element is exists in a list or not using Linear search
Q.6) Write a function to search a entered element is exists in a list or not using Binary search
Q.7) Write functions to do stack operations (push, pop, view, quit) using lists
Q.8) Write functions to do queue operations (enQueue, deQueue, view, quit) using lists
Q.9) Write a lambda function to display output of any 5 math methods (by passing list of Math
methods)
Q.10)
1. Write a lambda function to display maximum no. from list using LC and reduce function
2. Write a lambda function to calculate the sum of the numbers between 1 to 100 using reduce and
range function
Q.11) Write a python program to copy contents of one text file and paste it in another file