Programming and Problem Solving through Python Programming Examples
Python Programs
Program - 1
Python program to print first n perfect numbers
Program - 3
Python program that display a joke but display the punch line only when the user presses enter key
Program - 5
Python program to print 5@10@9
Program - 8
Python program to generate 3 random integers between 100 and 999 which is divisible by 5
Program - 11
Python program to find a side of a right angled triangle whose two sides and an angle is given
Program - 16
Python program to input a number and print its cube
Program - 20
Python program to print the volume of a cylinder when radius and height of the cylinder is given by user
Program - 21
Python program that asks your height in centimeters and converts it into foot and inches
Program - 26
Python program to take the temperatures of all 7 days of the week and displays the average temperature of that week
Program - 27
Python program to calculate the compound interest
Program - 29
Python Program to Calculate the Area of a Triangle
Program - 32
Python program to print quotient
Program - 33
Python program to calculate simple interest
Program - 36
Python program of division operator
Program - 37
Python program of modulus
Program - 38
Python program convert dollars in Rupee
Program - 39
Python program to convert kilometers to miles
Program - 46
Python program to take two inputs for day month and then calculate which day of the year
Program - 56
Python program to take two numbers and print if the first number is fully divisible by second number or not
Program - 57
Python program to input two number and swap them
Program - 59
Python program to read 3 numbers in 3variables and swap first two variables with the sums of first and second
Program - 60
Python credit card program
Program - 62
Python program to check divisibility of a number
Program - 63
Python program to print the largest number
Program - 64
Python program to check number is even or odd
Program - 65
Python program to print larger number using swap
Program - 66
Python program to input 2 integer number and check where they are same of different number
Program - 67
Python program to take two numbers and check that the first number is fully divisible by second number or not
Program - 68
Python program to check where is profit or loss
Program - 69
Python program to check number is buzz number or not
Program - 70
Python program to input assets liabilities and capital then check accounting equation means balanced or not
Program - 72
Python program to calculate debt to equity check whether it is risky scenario for investor or not
Program - 76
Python program using if Elif else statement to find the number of days present in a month
Program - 77
Pythoon program to read todays date only date Part from user Then display how many days are left in the current month
Program - 79
Python program to compute the result when two numbers and one operator is given by user
Program - 81
Python program to calculate electricity bill
Program - 84
Python program to input length of three sides of a triangle Then check if these sides will form a triangle or not
Program - 85
Python program to input 3 sides of a triangle and print whether it is an equilateral scalene or isosceles triangle
Program - 87
Python program that generates six random numbers in a sequence created with start stop step
Program - 88
Python program to check number is special or not
Program - 93
Python program to find the difference between greatest and smallest digits presents in the number
Program - 96
Python program to convert decimal number to binary
Program - 97
Python program to convert binary to decimal
Program - 101
Python program to input any string and count number of uppercase and lowercase letters
Program - 102
Python program to find the LCM of two input numbers
Program - 103
Python program to find GCD of 2 number
Program - 104
Python program to check number is perfect number or not
Program - 105
Python program to print all buzz numbers between 1 to n
Program - 107
Python program to print factor of given number
Program - 109
Python program to calculate compound simple interest after taking the principle rate and time
Program - 110
Python program to print table of entered number
Program - 111
Python program to calculate the sum of odd numbers divisible by 5 from the range 1 to 100
Program - 112
Python program to print Floyds triangle
Program - 115
Python program to test if given number is prime or not
Program - 118
Python program to find the average of the list of the numbers entered through keyboard
Program - 119
Python program to find the largest number from the list of the numbers entered through keyboard
Program - 120
Python program to find the sum of n natural numbers
Program - 121
Python program to print letters of word
Program - 122
Python program to find the sum of first n even numbers
Program - 123
Python program to print ASCII code for entered message
Program - 124
Python program to find the sum of first n odd numbers.
Program - 125
Python program to print first ten mersenne numbers
Program - 129
Python program to input any number and to print all natural numbers up to given number
Program - 130
Python program to input any number and to find sum of all natural numbers up to given number
Program - 132
Python Program to accept three distinct digits and print all possible combinations from the digits
Program - 133
Python program that input a list, replace it twice and then prints the sorted list in ascending and descending order
Program - 134
Python program to check if the maximum element of the list lies in the first half of the list or in the second half
Program - 135
Python program to display the maximum elements from the two list along with its index in its list
Program - 138
Python program to increment the elements of list
Program - 142
Python program to inter list of string and create a new list that consist of those strings with their first characters removed
Program - 144
Python program to create a list using for loop which consist square of the integers 1 through 50
Program - 145
Python program to create a list using for loop which consist a bb ccc dddd that ends with 26 copies of the letter z.
Program - 146
Python program that takes any two list L and M of the same size and adds their elements together in another third list
Program - 147
Python program to rotates the elements of list so that fist elements move to second and second to the third
Program - 149
Python program to display the maximum and minimum values form specified range of indexes of a list
Program - 150
Python program to compare two equal sized list and print the first index where they differ
Program - 151
Python program to find the 2nd largest number from the list of the numbers entered through keyboard.
Program - 153
Python program to define a list of countries that are a member of BRICS Check whether a county is member of BRICS or not
Program - 154
Python program to read marks of six subjects and to print the marks scored in each subject and show the total marks
Program - 158
Python program to generate in the Fibonacci series and store it in a list Then find the sum of all values
Program - 159
Python program to find minimum element from a list of elements along with its index in the list
Program - 164
Python program to reverses an array of integers
Program - 166
Python program that receives a Fibonacci series term and returns a number telling which term it is
Program - 168
Python program to interchange the values of two tuple
Program - 169
Python program to interchange the values of two tuple
Program - 170
Python program to swap two values using tuple assignment
Program - 171
Python program using a function that returns the area and circumference of a circle whose radius is passed as an argument
Program - 175
Python program to create a nested tuple to store roll number name and marks of students
Program - 176
Python program that interactively creates a nested tuple to store the marks in three subjects for five students
Program - 178
Python program to enter names of employees and their salaries as input and store them in a dictionary
Program - 180
Python program to convert a number entered by the user into its corresponding number in words
Program - 183
Python Program to Create a dictionary whose keys are month name and whose values are number of days in the corresponding month
Program - 186
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
Program - 189
Python program to create a new dictionary D2 having same keys as D1 but values as the sum of the list elements
Program - 192
Python program to create a dictionary whose keys are month names and values are their corresponding number of days
Program - 198
Python program to illustrate the global variable
Program - 200
Python program input string and prints its characters in different lines two characters per line
Program - 203
Python program that inputs a string and then prints it equal to number of times its length
Program - 205
Python program to create a function that would read contents from the sports.dat and creates a file named Atheletic.dat
Program - 207
Python code to display digits from abc.txt file
Program - 209
Python program to count the number of lines in the file
Program - 210
Python program to display the size of a file in byte
Program - 212
Python program to display only last line of a text file
Program - 215
Python program to read csv file content line by line
Program - 216