Programming Examples
Programming and problem solving through python Practical Questions
Topic : Introduction to Python
Question - 5
Python program that display a joke but display the punch line only when the user presses enter key
Topic : Operators Expressions and Python Statements
Question - 1
Python program to find a side of a right angled triangle whose two sides and an angle is given
Question - 2
Python program to obtain the marks in computer of some student and find mean median and mode
Question - 4
Python program to accept three side of triangle and find its area by using Herons Formula
Question - 10
Python program to print the volume of a cylinder when radius and height of the cylinder is given by user
Question - 11
Python program that asks your height in centimeters and converts it into foot and inches
Question - 15
Python program to take the temperatures of all 7 days of the week and displays the average temperature of that week
Question - 39
Python program that asks a user for a number of years and then prints out the number of days hours minutes and seconds
Question - 42
Python program to take two inputs for day month and then calculate which day of the year
Question - 50
Python program to input 3 numbers from user and check these are unique numbers are not
Question - 52
Python program to take two numbers and print if the first number is fully divisible by second number or not
Question - 55
Python program to read 3 numbers in 3variables and swap first two variables with the sums of first and second
Question - 62
Python program to input three unequal numbers and display the greatest and the smallest number
Question - 63
Python program to take two numbers and check that the first number is fully divisible by second number or not
Question - 69
Python program to input assets liabilities and capital then check accounting equation means balanced or not
Question - 71
Python program to calculate debt to equity check whether it is risky scenario for investor or not
Question - 72
Python program to input 2 integer number and check where they are same of different number
Question - 73
Pythoon program to read todays date only date Part from user Then display how many days are left in the current month
Question - 74
Python program to compute the result when two numbers and one operator is given by user
Question - 81
Python program to input length of three sides of a triangle Then check if these sides will form a triangle or not
Question - 82
Python program to input 3 sides of a triangle and print whether it is an equilateral scalene or isosceles triangle
Question - 83
Python program using if Elif else statement to find the number of days present in a month
Question - 84
Python program to accept marks of English math and science and display the appropriate stream allotted to the candidate
Question - 88
Python program to input any string and count number of uppercase and lowercase letters
Question - 93
Python program to find the difference between greatest and smallest digits presents in the number
Question - 104
Python program to check whether it is a prime number or not If it is not a prime then display the next number that is prime
Question - 105
Python program to calculate compound simple interest after taking the principle rate and time
Question - 110
Python program to find the average of the list of the numbers entered through keyboard
Question - 111
Python program to find the largest number from the list of the numbers entered through keyboard
Question - 116
Python program to input any number and to print all natural numbers up to given number
Question - 117
Python program to input any number and to find sum of all natural numbers up to given number
Question - 122
Python program to calculate the sum of odd numbers divisible by 5 from the range 1 to 100
Question - 129
Python program to Print numbers from 11 to N When the number is a multiple of 3 print Tipsy when it is a multiple of 7 print Topsy
Topic : Sequence data types in python
Question - 1
Python program to find the 2nd largest number from the list of the numbers entered through keyboard.
Question - 4
Python program to read marks of six subjects and to print the marks scored in each subject and show the total marks
Question - 8
Python program to generate in the Fibonacci series and store it in a list Then find the sum of all values
Question - 9
Python program to find minimum element from a list of elements along with its index in the list
Question - 16
Python program that input a list, replace it twice and then prints the sorted list in ascending and descending order
Question - 17
Python program to check if the maximum element of the list lies in the first half of the list or in the second half
Question - 18
Python program to display the maximum elements from the two list along with its index in its list
Question - 25
Python program to inter list of string and create a new list that consist of those strings with their first characters removed
Question - 27
Python program to create a list using for loop which consist square of the integers 1 through 50
Question - 28
Python program to create a list using for loop which consist a bb ccc dddd that ends with 26 copies of the letter z.
Question - 29
Python program that takes any two list L and M of the same size and adds their elements together in another third list
Question - 30
Python program to rotates the elements of list so that fist elements move to second and second to the third
Question - 32
Python program to display the maximum and minimum values form specified range of indexes of a list
Question - 33
Python program to compare two equal sized list and print the first index where they differ
Question - 34
Python program that receives a Fibonacci series term and returns a number telling which term it is
Question - 35
Python Program to accept three distinct digits and print all possible combinations from the digits
Question - 38
Python program using a function that returns the area and circumference of a circle whose radius is passed as an argument
Question - 45
Python program to create a nested tuple to store roll number name and marks of students
Question - 46
Python program that interactively creates a nested tuple to store the marks in three subjects for five students
Question - 49
Python program to create a dictionary whose keys are month names and values are their corresponding number of days
Question - 50
Python program to enter names of employees and their salaries as input and store them in a dictionary
Question - 52
Python program to convert a number entered by the user into its corresponding number in words
Question - 55
Python Program to Create a dictionary whose keys are month name and whose values are number of days in the corresponding month
Question - 58
Python program that lists the over lapping keys of the two dictionaries if a key of d1 is also a key of d2 the list it
Question - 61
Python program to create a new dictionary D2 having same keys as D1 but values as the sum of the list elements
Question - 63 [ O Level JAN-2022]
Python function that takes a string as parameter and returns a string with every successive repetitive character replaced
Topic : Functions in Python
Question - 1 [ O Level JUL-2023]
Write a function with name dividebyfive which generate and prints a random integer number from the range 0 to 100 and then return True if the randomly generated number is divisible by 5, and False otherwise.
Question - 7
Python function to find the sum of all numbers between 100 and 500 which are divisible by 2
Question - 11
Python program that generates six random numbers in a sequence created with start stop step
Question - 15
Python function to accept 2 number and return addition subtraction multiplication and division
Topic : File Processing in Python
Question - 16
Python program to create a function that would read contents from the sports.dat and creates a file named Atheletic.dat
Topic : Modules in Python
Question - 3
Python program to generate 3 random integers between 100 and 999 which is divisible by 5
Topic : NumPy Basics
Question - 2 [ O Level JAN-2023]
Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:
Topic : String Handling in Python
Question - 1
Python program input string and prints its characters in different lines two characters per line
Question - 5
Python program that display a joke but display the punch line only when the user presses enter key
Topic : Operators Expressions and Python Statements
Question - 1
Python program to find a side of a right angled triangle whose two sides and an angle is given
Question - 2
Python program to obtain the marks in computer of some student and find mean median and mode
Question - 4
Python program to accept three side of triangle and find its area by using Herons Formula
Question - 10
Python program to print the volume of a cylinder when radius and height of the cylinder is given by user
Question - 11
Python program that asks your height in centimeters and converts it into foot and inches
Question - 15
Python program to take the temperatures of all 7 days of the week and displays the average temperature of that week
Question - 39
Python program that asks a user for a number of years and then prints out the number of days hours minutes and seconds
Question - 42
Python program to take two inputs for day month and then calculate which day of the year
Question - 50
Python program to input 3 numbers from user and check these are unique numbers are not
Question - 52
Python program to take two numbers and print if the first number is fully divisible by second number or not
Question - 55
Python program to read 3 numbers in 3variables and swap first two variables with the sums of first and second
Question - 62
Python program to input three unequal numbers and display the greatest and the smallest number
Question - 63
Python program to take two numbers and check that the first number is fully divisible by second number or not
Question - 69
Python program to input assets liabilities and capital then check accounting equation means balanced or not
Question - 71
Python program to calculate debt to equity check whether it is risky scenario for investor or not
Question - 72
Python program to input 2 integer number and check where they are same of different number
Question - 73
Pythoon program to read todays date only date Part from user Then display how many days are left in the current month
Question - 74
Python program to compute the result when two numbers and one operator is given by user
Question - 81
Python program to input length of three sides of a triangle Then check if these sides will form a triangle or not
Question - 82
Python program to input 3 sides of a triangle and print whether it is an equilateral scalene or isosceles triangle
Question - 83
Python program using if Elif else statement to find the number of days present in a month
Question - 84
Python program to accept marks of English math and science and display the appropriate stream allotted to the candidate
Question - 88
Python program to input any string and count number of uppercase and lowercase letters
Question - 93
Python program to find the difference between greatest and smallest digits presents in the number
Question - 104
Python program to check whether it is a prime number or not If it is not a prime then display the next number that is prime
Question - 105
Python program to calculate compound simple interest after taking the principle rate and time
Question - 110
Python program to find the average of the list of the numbers entered through keyboard
Question - 111
Python program to find the largest number from the list of the numbers entered through keyboard
Question - 116
Python program to input any number and to print all natural numbers up to given number
Question - 117
Python program to input any number and to find sum of all natural numbers up to given number
Question - 122
Python program to calculate the sum of odd numbers divisible by 5 from the range 1 to 100
Question - 129
Python program to Print numbers from 11 to N When the number is a multiple of 3 print Tipsy when it is a multiple of 7 print Topsy
Topic : Sequence data types in python
Question - 1
Python program to find the 2nd largest number from the list of the numbers entered through keyboard.
Question - 4
Python program to read marks of six subjects and to print the marks scored in each subject and show the total marks
Question - 8
Python program to generate in the Fibonacci series and store it in a list Then find the sum of all values
Question - 9
Python program to find minimum element from a list of elements along with its index in the list
Question - 16
Python program that input a list, replace it twice and then prints the sorted list in ascending and descending order
Question - 17
Python program to check if the maximum element of the list lies in the first half of the list or in the second half
Question - 18
Python program to display the maximum elements from the two list along with its index in its list
Question - 25
Python program to inter list of string and create a new list that consist of those strings with their first characters removed
Question - 27
Python program to create a list using for loop which consist square of the integers 1 through 50
Question - 28
Python program to create a list using for loop which consist a bb ccc dddd that ends with 26 copies of the letter z.
Question - 29
Python program that takes any two list L and M of the same size and adds their elements together in another third list
Question - 30
Python program to rotates the elements of list so that fist elements move to second and second to the third
Question - 32
Python program to display the maximum and minimum values form specified range of indexes of a list
Question - 33
Python program to compare two equal sized list and print the first index where they differ
Question - 34
Python program that receives a Fibonacci series term and returns a number telling which term it is
Question - 35
Python Program to accept three distinct digits and print all possible combinations from the digits
Question - 38
Python program using a function that returns the area and circumference of a circle whose radius is passed as an argument
Question - 45
Python program to create a nested tuple to store roll number name and marks of students
Question - 46
Python program that interactively creates a nested tuple to store the marks in three subjects for five students
Question - 49
Python program to create a dictionary whose keys are month names and values are their corresponding number of days
Question - 50
Python program to enter names of employees and their salaries as input and store them in a dictionary
Question - 52
Python program to convert a number entered by the user into its corresponding number in words
Question - 55
Python Program to Create a dictionary whose keys are month name and whose values are number of days in the corresponding month
Question - 58
Python program that lists the over lapping keys of the two dictionaries if a key of d1 is also a key of d2 the list it
Question - 61
Python program to create a new dictionary D2 having same keys as D1 but values as the sum of the list elements
Question - 63 [ O Level JAN-2022]
Python function that takes a string as parameter and returns a string with every successive repetitive character replaced
Topic : Functions in Python
Question - 1 [ O Level JUL-2023]
Write a function with name dividebyfive which generate and prints a random integer number from the range 0 to 100 and then return True if the randomly generated number is divisible by 5, and False otherwise.
Question - 7
Python function to find the sum of all numbers between 100 and 500 which are divisible by 2
Question - 11
Python program that generates six random numbers in a sequence created with start stop step
Question - 15
Python function to accept 2 number and return addition subtraction multiplication and division
Topic : File Processing in Python
Question - 16
Python program to create a function that would read contents from the sports.dat and creates a file named Atheletic.dat
Topic : Modules in Python
Question - 3
Python program to generate 3 random integers between 100 and 999 which is divisible by 5
Topic : NumPy Basics
Question - 2 [ O Level JAN-2023]
Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:
Topic : String Handling in Python
Question - 1
Python program input string and prints its characters in different lines two characters per line
Question - 1
Python program to find a side of a right angled triangle whose two sides and an angle is given
Question - 2
Python program to obtain the marks in computer of some student and find mean median and mode
Question - 4
Python program to accept three side of triangle and find its area by using Herons Formula
Question - 10
Python program to print the volume of a cylinder when radius and height of the cylinder is given by user
Question - 11
Python program that asks your height in centimeters and converts it into foot and inches
Question - 15
Python program to take the temperatures of all 7 days of the week and displays the average temperature of that week
Question - 39
Python program that asks a user for a number of years and then prints out the number of days hours minutes and seconds
Question - 42
Python program to take two inputs for day month and then calculate which day of the year
Question - 50
Python program to input 3 numbers from user and check these are unique numbers are not
Question - 52
Python program to take two numbers and print if the first number is fully divisible by second number or not
Question - 55
Python program to read 3 numbers in 3variables and swap first two variables with the sums of first and second
Question - 62
Python program to input three unequal numbers and display the greatest and the smallest number
Question - 63
Python program to take two numbers and check that the first number is fully divisible by second number or not
Question - 69
Python program to input assets liabilities and capital then check accounting equation means balanced or not
Question - 71
Python program to calculate debt to equity check whether it is risky scenario for investor or not
Question - 72
Python program to input 2 integer number and check where they are same of different number
Question - 73
Pythoon program to read todays date only date Part from user Then display how many days are left in the current month
Question - 74
Python program to compute the result when two numbers and one operator is given by user
Question - 81
Python program to input length of three sides of a triangle Then check if these sides will form a triangle or not
Question - 82
Python program to input 3 sides of a triangle and print whether it is an equilateral scalene or isosceles triangle
Question - 83
Python program using if Elif else statement to find the number of days present in a month
Question - 84
Python program to accept marks of English math and science and display the appropriate stream allotted to the candidate
Question - 88
Python program to input any string and count number of uppercase and lowercase letters
Question - 93
Python program to find the difference between greatest and smallest digits presents in the number
Question - 104
Python program to check whether it is a prime number or not If it is not a prime then display the next number that is prime
Question - 105
Python program to calculate compound simple interest after taking the principle rate and time
Question - 110
Python program to find the average of the list of the numbers entered through keyboard
Question - 111
Python program to find the largest number from the list of the numbers entered through keyboard
Question - 116
Python program to input any number and to print all natural numbers up to given number
Question - 117
Python program to input any number and to find sum of all natural numbers up to given number
Question - 122
Python program to calculate the sum of odd numbers divisible by 5 from the range 1 to 100
Question - 129
Python program to Print numbers from 11 to N When the number is a multiple of 3 print Tipsy when it is a multiple of 7 print Topsy
Topic : Sequence data types in python
Question - 1
Python program to find the 2nd largest number from the list of the numbers entered through keyboard.
Question - 4
Python program to read marks of six subjects and to print the marks scored in each subject and show the total marks
Question - 8
Python program to generate in the Fibonacci series and store it in a list Then find the sum of all values
Question - 9
Python program to find minimum element from a list of elements along with its index in the list
Question - 16
Python program that input a list, replace it twice and then prints the sorted list in ascending and descending order
Question - 17
Python program to check if the maximum element of the list lies in the first half of the list or in the second half
Question - 18
Python program to display the maximum elements from the two list along with its index in its list
Question - 25
Python program to inter list of string and create a new list that consist of those strings with their first characters removed
Question - 27
Python program to create a list using for loop which consist square of the integers 1 through 50
Question - 28
Python program to create a list using for loop which consist a bb ccc dddd that ends with 26 copies of the letter z.
Question - 29
Python program that takes any two list L and M of the same size and adds their elements together in another third list
Question - 30
Python program to rotates the elements of list so that fist elements move to second and second to the third
Question - 32
Python program to display the maximum and minimum values form specified range of indexes of a list
Question - 33
Python program to compare two equal sized list and print the first index where they differ
Question - 34
Python program that receives a Fibonacci series term and returns a number telling which term it is
Question - 35
Python Program to accept three distinct digits and print all possible combinations from the digits
Question - 38
Python program using a function that returns the area and circumference of a circle whose radius is passed as an argument
Question - 45
Python program to create a nested tuple to store roll number name and marks of students
Question - 46
Python program that interactively creates a nested tuple to store the marks in three subjects for five students
Question - 49
Python program to create a dictionary whose keys are month names and values are their corresponding number of days
Question - 50
Python program to enter names of employees and their salaries as input and store them in a dictionary
Question - 52
Python program to convert a number entered by the user into its corresponding number in words
Question - 55
Python Program to Create a dictionary whose keys are month name and whose values are number of days in the corresponding month
Question - 58
Python program that lists the over lapping keys of the two dictionaries if a key of d1 is also a key of d2 the list it
Question - 61
Python program to create a new dictionary D2 having same keys as D1 but values as the sum of the list elements
Question - 63 [ O Level JAN-2022]
Python function that takes a string as parameter and returns a string with every successive repetitive character replaced
Topic : Functions in Python
Question - 1 [ O Level JUL-2023]
Write a function with name dividebyfive which generate and prints a random integer number from the range 0 to 100 and then return True if the randomly generated number is divisible by 5, and False otherwise.
Question - 7
Python function to find the sum of all numbers between 100 and 500 which are divisible by 2
Question - 11
Python program that generates six random numbers in a sequence created with start stop step
Question - 15
Python function to accept 2 number and return addition subtraction multiplication and division
Topic : File Processing in Python
Question - 16
Python program to create a function that would read contents from the sports.dat and creates a file named Atheletic.dat
Topic : Modules in Python
Question - 3
Python program to generate 3 random integers between 100 and 999 which is divisible by 5
Topic : NumPy Basics
Question - 2 [ O Level JAN-2023]
Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:
Topic : String Handling in Python
Question - 1
Python program input string and prints its characters in different lines two characters per line
Question - 1
Python program to find the 2nd largest number from the list of the numbers entered through keyboard.
Question - 4
Python program to read marks of six subjects and to print the marks scored in each subject and show the total marks
Question - 8
Python program to generate in the Fibonacci series and store it in a list Then find the sum of all values
Question - 9
Python program to find minimum element from a list of elements along with its index in the list
Question - 16
Python program that input a list, replace it twice and then prints the sorted list in ascending and descending order
Question - 17
Python program to check if the maximum element of the list lies in the first half of the list or in the second half
Question - 18
Python program to display the maximum elements from the two list along with its index in its list
Question - 25
Python program to inter list of string and create a new list that consist of those strings with their first characters removed
Question - 27
Python program to create a list using for loop which consist square of the integers 1 through 50
Question - 28
Python program to create a list using for loop which consist a bb ccc dddd that ends with 26 copies of the letter z.
Question - 29
Python program that takes any two list L and M of the same size and adds their elements together in another third list
Question - 30
Python program to rotates the elements of list so that fist elements move to second and second to the third
Question - 32
Python program to display the maximum and minimum values form specified range of indexes of a list
Question - 33
Python program to compare two equal sized list and print the first index where they differ
Question - 34
Python program that receives a Fibonacci series term and returns a number telling which term it is
Question - 35
Python Program to accept three distinct digits and print all possible combinations from the digits
Question - 38
Python program using a function that returns the area and circumference of a circle whose radius is passed as an argument
Question - 45
Python program to create a nested tuple to store roll number name and marks of students
Question - 46
Python program that interactively creates a nested tuple to store the marks in three subjects for five students
Question - 49
Python program to create a dictionary whose keys are month names and values are their corresponding number of days
Question - 50
Python program to enter names of employees and their salaries as input and store them in a dictionary
Question - 52
Python program to convert a number entered by the user into its corresponding number in words
Question - 55
Python Program to Create a dictionary whose keys are month name and whose values are number of days in the corresponding month
Question - 58
Python program that lists the over lapping keys of the two dictionaries if a key of d1 is also a key of d2 the list it
Question - 61
Python program to create a new dictionary D2 having same keys as D1 but values as the sum of the list elements
Question - 63 [ O Level JAN-2022]
Python function that takes a string as parameter and returns a string with every successive repetitive character replaced
Topic : Functions in Python
Question - 1 [ O Level JUL-2023]
Write a function with name dividebyfive which generate and prints a random integer number from the range 0 to 100 and then return True if the randomly generated number is divisible by 5, and False otherwise.
Question - 7
Python function to find the sum of all numbers between 100 and 500 which are divisible by 2
Question - 11
Python program that generates six random numbers in a sequence created with start stop step
Question - 15
Python function to accept 2 number and return addition subtraction multiplication and division
Topic : File Processing in Python
Question - 16
Python program to create a function that would read contents from the sports.dat and creates a file named Atheletic.dat
Topic : Modules in Python
Question - 3
Python program to generate 3 random integers between 100 and 999 which is divisible by 5
Topic : NumPy Basics
Question - 2 [ O Level JAN-2023]
Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:
Topic : String Handling in Python
Question - 1
Python program input string and prints its characters in different lines two characters per line
Question - 1 [ O Level JUL-2023]
Write a function with name dividebyfive which generate and prints a random integer number from the range 0 to 100 and then return True if the randomly generated number is divisible by 5, and False otherwise.
Question - 7
Python function to find the sum of all numbers between 100 and 500 which are divisible by 2
Question - 11
Python program that generates six random numbers in a sequence created with start stop step
Question - 15
Python function to accept 2 number and return addition subtraction multiplication and division
Topic : File Processing in Python
Question - 16
Python program to create a function that would read contents from the sports.dat and creates a file named Atheletic.dat
Topic : Modules in Python
Question - 3
Python program to generate 3 random integers between 100 and 999 which is divisible by 5
Topic : NumPy Basics
Question - 2 [ O Level JAN-2023]
Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:
Topic : String Handling in Python
Question - 1
Python program input string and prints its characters in different lines two characters per line
Question - 16
Python program to create a function that would read contents from the sports.dat and creates a file named Atheletic.dat
Topic : Modules in Python
Question - 3
Python program to generate 3 random integers between 100 and 999 which is divisible by 5
Topic : NumPy Basics
Question - 2 [ O Level JAN-2023]
Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:
Topic : String Handling in Python
Question - 1
Python program input string and prints its characters in different lines two characters per line
Question - 3
Python program to generate 3 random integers between 100 and 999 which is divisible by 5
Topic : NumPy Basics
Question - 2 [ O Level JAN-2023]
Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:
Topic : String Handling in Python
Question - 1
Python program input string and prints its characters in different lines two characters per line
Question - 2 [ O Level JAN-2023]
Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:
Topic : String Handling in Python
Question - 1
Python program input string and prints its characters in different lines two characters per line
Question - 1