MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program which accepts 6 integer values and prints “DUPLICATES” if any of the
values entered are duplicates otherwise it prints “ALL UNIQUE”.
Example: Let 5 integers are (32, 10, 45, 90, 45, 6) then output
“DUPLICATES” to be printed.
12M
Q.2 Write a program to sort elements from the tuple. 5M
Q.3 Write a Python program to check whether an element exists within a tuple 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program to display the following pattern. 12M
1 2 3 4
1 2 3
1 2
1
Q.2 Write a Python program to check whether an element exists within a tuple. 5M
Q.3 Write a Python program to convert tuple to a string 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program which finds the sum of digits of a number. Example n=130 then output is
4 (1+3+0). 12M
Q.2 Write a Python program to find the length of a set. 5M
Q.3 Write a Python program to get the 5th element from front and 5th element from last of a tuple
5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program to print n no of Fibonacci series. 12M
Q.2 Write a Python program to do iteration over sets. 5M
Q.3 Write a Python program to convert tuple to a string. 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program to replace all occurrences of ‘a’ with $ in a String. (Ex. apple then output is
$apple). 12M
Q.2 Write a Python script to concatenate the following dictionaries to create a new one.
Sample Dictionary:
dic1={1:10,2:20}
dic2={3:30,4:40}
dic3={5:50,6:60}
Expected Result : {1: 10, 2: 20, 3: 30, 4: 40, 5: 50, 6: 60}
10M
Q.3 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program to display the following pattern. 12M
1 2 3 4
1 2 3
1 2
1
Q.2 Write a Python program to create set difference and a symmetric difference 5M
Q.3 Write a python program to get the 5th element from front and 5th element from last of a tuple
5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a Python program to get a single string from two given strings, separated by a space and swap
the first two characters of each string.
Sample String: ppk abc
Expected Result: abkpp 12M
Q.2 Write a python program to check if a string is a Palindrome or Not 10M
Q.3 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a Python program to count the occurrences of each word in a given sentence.
12M
Q.2 Write a Python program to check whether an element exists within a tuple. 5M
Q.3 Write a Python program to do iteration over sets. 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program which accepts an integer value ‘n’ and displays all prime numbers till ‘n’.
12M
Q.2 Write a Python program to iterate over dictionaries using for loops. 5M
Q.3 Write a Python program to check whether an element exists within a tuple. 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a Python program to calculate the Number of Digits and Letters in a string.
12M
Q.2 Write a Python function that takes a number as a parameter and check the number is
prime or not 10M
Q.3 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program which finds the sum of digits of a number. Example n=130 then output is 4
(1+3+0). 12M
Q.2 Write a recursive function to calculate the sum of numbers from 0 to 10. 10M
Q.3 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program to display the following pattern. 12M
1 2 3 4
1 2 3
1 2
1
Q.2 Write a Python function to check whether a number is in a given range. 5M
Q.3 Write a Python program to create an intersection of sets. 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a Python program to calculate the Number of Digits and Letters in a string. 12M
Q.2 Write a Python program to remove a key from a dictionary. Sample Dictionary:
myDict = {'a':1,'b':2,'c':3,'d':4}
Sample Output:
{'b':2,'c':3,'d':4} 5M
Q.3 Write a python program to calculate length of a given string without using library function.
5M
Q. 4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program to reverse a given number. 12M
Q.2 Write a Python program to create an intersection of sets. 5M
Q.3 Write a Python function to check whether a number is in a given range. 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program which accept an integer value ‘n’ and display all prime numbers till ‘n’.
12M
Q.2 Write a Python program to check whether an element exists within a tuple 5M
Q.3 Write a Python program to find the length of a set. 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program to display the following pattern. 12M
1 2 3 4
1 2 3
1 2
1
Q.2. Write a recursive function to calculate the sum of numbers from 0 to 10. 10M
Q.3 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a Python program to remove the characters which have odd index values of a given
string. 12M
Q.2 Write a Python function to multiply all the numbers in a list.
Sample-List: (8, 2, 3, -1, 7)
Expected Output: -336 10M
Q.3 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a Python program to count the occurrences of each word in a given sentence. 12M
Q.2 Write a Python function to check whether a number is in a given range. 5M
Q.3 Write a Python program to find the length of a set. 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a Python program to count the occurrences of each word in a given sentence. 12M
Q.2 Write a Python program to create set difference and a symmetric difference. 5M
Q.3 Write a Python program to convert tuple to a string 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a python program to remove and return an arbitrary set element.
Display error message if the set is empty. 12M
Q.2 Write an anonymous function to calculate the area of the square. 10M
Q.3 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Create a function showEmployee() in such a way that it should accept employee name, and it’s
salary and display both, and if the salary is missing in function call it should show it as 9000
12M
Q.2 Write a program to sort elements from the tuple. 5M
Q.3 Write a Python program to create set difference and a symmetric difference 5M
Q.4 Viva 3M
MES Abasaheb Garware College (Autonomous)
F. Y. B. Sc (Cyber Security) Practical Examination
Semester II
Subject Code: CYS-162-PR-Lab on Python Programming
Duration: 3 Hours Maximum Marks: 25
Q.1 Write a program which accepts 6 integer values and prints “DUPLICATES” if any of
the values entered are duplicates otherwise it prints “ALL UNIQUE”.
Example: Let 5 integers are (32, 10, 45, 90, 45, 6) then output “DUPLICATES” to be
printed. 12M
Q.2 Write a Python function to check whether a number is in a given range 5M
Q.3 Write a program to sort elements from the tuple 5M
Q.4 Viva 3M