0% found this document useful (0 votes)
3 views7 pages

PWP PR QB bank

Practical questions for python

Uploaded by

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

PWP PR QB bank

Practical questions for python

Uploaded by

sc597442
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Write a program using different Bitwise operators in Python .

Write a program using different logical operators in Python .

Write a program to swap the value of two variables.

Write a program to calculate surface volume and area of a cylinder.

Write a program to check the largest number among the three numbers

Write a program to check if the input year is a leap year of not


Write a program to check if a Number is Positive, Negative or Zero

Write a program that takes the marks of 5 subjects and displays the grades.

The following program uses a nested for loop to find the prime numbers from 2 to 100

Write a Python program that takes a number and checks whether it is a palindrome or not.

Write a Python program to print all even numbers between 1 to 100 using while loop.

Print the following patterns using loop:


1010101
101
1

Print the following patterns using loop:


*
***
*****
***
*

Write a Python Program to Reverse a given number by using loop.


Write a python program to find Factorial of given number.

Write a python program to find Fibonacci series for given number.

Find sum of four digit number using loop.

Write program to demonstrate use of nested if-else.

Write a program the use different list Functions.

Write a program 'for a method to reverse a list.

Write a Python program to find common items from two lists.


Write a Python program to sort a list.
Write program to copy specific elements existing tuple into new tuple.
Create a tuple and find the minimum and maximum number from it.
Write a Python program to find the repeated items of a tuple.

Write a program on the various set operations.

Write a Python program to create a set, add member(s) in a set and remove one item from set.
4) Write a Python program to find maximum and the minimum value in a set.

5) Write a Python program to find the length of a set.

Write a Python program to perform following operations on set: intersection of sets,union of sets, set difference, symmetric difference, clear a

Write a Python script to sort (ascending and descending) a dictionary by value.

Write a Python script to concatenate following dictionaries to create a new one.


Sample Dictionary:
dic1 = {1:10, 2:20}
dic2 = {3:30, 4:40}
dic3 = {5:50,6:60}

Write a Python program to perform following operations on set: intersection of sets, union of sets, set difference, symmetric difference, clear a

Write a Python program to combine two dictionary adding values for common keys.
d1 = {'a': 100, 'b': 200, 'c':300}
d2 = {'a': 300, 'b': 200, 'd':400}

Write a Python program to find the highest 3 values in a dictionary.

Write a Python function that takes a number as a parameter and check the number is prime or not

Write a Python function to calculate the factorial of a number (a non-negative integer). The function accepts the number as an argument.

Write a Python function that accepts a string and calculate the number of upper case letters and lower case letters.

Write a program on Function Argument in Python?


Write a program on keyword argument.

Write a Python program to create a user defined module that will ask your college name and will display the name of the college.

Write a Python program to define a module to find Fibonacci Numbers and import the module to another program.

Write a Python program to display calendar of given month using Calendar module.
Write a python program to calculate area of circle using inbuilt Math module.
create your own package in Python

Write a program on constructor overloading in Python.

Write a python program to implement constructor.


Write a python program to implement parameterized constructor.

Write a python program to implement constructor overriding

Write a Python program to create a class to print the area of a square and a rectangle. The class has two methods with the same name but different number of par
printing area of rectangle has two parameters which are length and breadth respectively while the other method for printing area of square has one parameter w

Write a Python program to create a class 'Degree' having a method 'getDegree' that prints "I got a degree". It has two subclasses namely 'Undergraduate' and Post
method with the same name that prints "I am an Undergraduate" and "I am a Postgraduate" respectively. Call the method by creating an object of each of t

Write Python program to read and print students information using single inheritance..

Write a Python program to implement multiple inheritance.

Write a Python program to implement multilevel inheritance.

Write a Python program to create series from array using Panda.


Write a Python program to create series from list using Panda.

Write a Python program to access element of series using Panda.

Write a Python program to create DataFrame using list or dictionary using Panda.

Write GUI program to import Tkinter package and create a window and set its title.

You might also like