0% found this document useful (0 votes)
10 views

Java Program

The document lists a series of Python practical assignment questions aimed at enhancing programming skills. Topics include basic operations, data structures, exception handling, object-oriented programming, and database connectivity. Each question requires the implementation of specific functionalities using Python.

Uploaded by

SUMIT KUMAR
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)
10 views

Java Program

The document lists a series of Python practical assignment questions aimed at enhancing programming skills. Topics include basic operations, data structures, exception handling, object-oriented programming, and database connectivity. Each question requires the implementation of specific functionalities using Python.

Uploaded by

SUMIT KUMAR
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
You are on page 1/ 2

Python Practical File Assisgnment Questions

1. Write a Program to Print Numbers in Decreasing Order.


2. Write a Program to Program to Print the Natural Numbers.
3. Write a Python program to take two numbers as input and
perform addition, subtraction, multiplication, and division.
4. Write a Python program to Take a number as input and print the
sum of its digits.
5. Write a program that calculates the factorial of a given number
using a loop.
6. Write a Python function to check if a given string is a
palindrome.
7. Write a Python script to generate the Fibonacci series up to a
given number of terms.
8. Create a program that performs the following operations on a
list: add, remove, sort, and reverse elements.
9. Write a Python program to reverse a list without using the
reverse() method.
10.Write a Python program to sort a list in ascending and
descending order.
11.Write a Python program to merge two lists and remove duplicate
elements.
12.Write a program that allows users to add, update, and delete key-
value pairs in a dictionary.
13.Write a Python program for Given a list of tuples, convert it into a
dictionary where values with the same key are grouped.
Example input: [('A', 10), ('B', 20), ('A', 30), ('B', 40)]
a. Expected output: {'A': [10, 30], 'B': [20, 40]}
14.Write a program that takes a string and counts the occurrence of
each word, storing the result in a dictionary.
15.Write a Python program that takes two numbers as input and
divides them. Use exception handling to handle cases where the
denominator is zero.
16.Write a function validate_age(age) that raises a ValueError if the
age is less than 18. The function should take input from the user
and handle errors appropriately.
17.Write a Python program to Create a Child class that inherits from
both and call show() from a Child object.
18.Write a function that takes an object of either Dog or Cat class
and calls their speak() method, demonstrating polymorphism.
Python Practical File Assisgnment Questions

19.Write a Python program to Connect to a MySQL database using


mysql-connector-python and create a table Employees with id,
name, position, and salary.
20.Write a Python program to where multiple threads update a
shared variable, ensuring thread safety using Lock.

You might also like