Practical Assignment Question Sybca(Sci) (1)
Practical Assignment Question Sybca(Sci) (1)
Practical Assignment - 1
BASIC PYTHON
Q.1
2. Write a program which accepts 6 integer values and prints “DUPLICATES” if any of the
3. Write a program which accepts an integer value as command line and print “Ok” if value is
Q.2
1. Write a program which accept an integer value ‘n’ and display all prime numbers till ‘n’.
2. Write a program that accept two integer values and if both are equal then prints “SAME
1234
123
12
Practical Assignment - 2
PYTHON STRING
Q.1
1. Write a program to replace all occurrences of ‘a’with $ in a String. (Ex. apple then output is $pple).
2. Write a Python program to count the number of characters (character frequency) in a string.
3. Write a Python program to get a string made of the first 2 and the last 2 chars from a given a string.
If the string length is less than 2, return instead of the empty string.
4. Write a Python program to calculate the Length of a String without using a Library Function.
Q.2
2. Write a Python program to calculate the Number of Digits and Letters in a string.
3. Write a Python program to remove the characters which have odd index values of a given string.
4. Write a Python program to count the occurrences of each word in a given sentence.
Dr. D. Y. Patil Unitech Society’s
DR. D. Y. PATIL ARTS, COMMERCE AND SCIENCE COLLEGE, PIMPRI, PUNE - 18
Department of Computer Science
2024 – 2025
Practical Assignment - 3
PYTHON TUPLE
Q.1
2. Write a Python program to create a list of tuples with the first element as the number and second
3. Write a Python program to create a tuple with numbers and print one item.
Q.2
3. Write a Python program to get the 5th element from front and 5th element from last of a tuple.
Practical Assignment - 4
PYTHON SET
Q.1
sets = {1, 2, 3, 4, 4}
print(sets)
2. Write a python program to remove and return an arbitrary set element. Raise KeyError if
Q.2
1. Write a Python program to accept the strings which contains all vowels .
4. Write a Python program to find maximum and the minimum value in a set.
Practical Assignment - 5
PYTHON DICTIONARY
Q.1
Sample Output:
Q.2
2. Write a Python program to combine two dictionary adding values for common keys.
3. Write a Python script to generate and print a dictionary that contains a number (Between 1 and n)
in the form (x, x*x).
Practical Assignment - 6
PYTHON FUNCTIONS
Q.1
4. 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.
Q.2
1. Write a Python function that takes a number as a parameter and check the number is prime or not.
Question Bank
Class: BCA(Science) Semester-IV
What is the importance of flexible function interfaces and interactive computing in Python?
Viva Topics:
What are Python’s membership operators (in and not in)? Provide examples.
Explain Python loops (for, while) and loop control statements (break, continue, pass).
What are the mathematical functions and constants in Python (import math)?
Viva Topics:
What are the differences between single quotes, double quotes, and triple quotes in Python?
Viva Topics:
Discuss functional programming tools in Python such as filter(), map(), and reduce().
Viva Topics:
Explain how you access values in a tuple and perform tuple operations.
Viva Topics:
Explain the different types of function arguments in Python (Pass by value, Keyword arguments,
Default arguments).
Viva Topics:
Question Bank
Define a project. How does a software project differ from other types of projects?
Explain the concept of Work Breakdown Structure (WBS) and its types.
Explain the different types of activity relationships: FS, SF, SS, and FF.
Explain the critical path concept and discuss remedies for managing critical paths.
Discuss the importance of managing people and understanding organizational behavior in software
projects.
What are the best methods for staff selection in software projects?