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

Basic Python Programs: o o o o o o o o o

This document outlines many basic and intermediate Python programs covering a wide range of concepts. These include programs to print basic text, perform calculations, work with conditions and loops, define functions, manipulate different data types like matrices and strings, and work with arrays, linked lists, and other data structures. The programs provide examples of working with core Python features like variables, data types, control flow, functions, and collections.

Uploaded by

Arjun Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
422 views

Basic Python Programs: o o o o o o o o o

This document outlines many basic and intermediate Python programs covering a wide range of concepts. These include programs to print basic text, perform calculations, work with conditions and loops, define functions, manipulate different data types like matrices and strings, and work with arrays, linked lists, and other data structures. The programs provide examples of working with core Python features like variables, data types, control flow, functions, and collections.

Uploaded by

Arjun Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Basic Python programs

o Python program to print "Hello Python"


o Python program to do arithmetical operations
o Python program to find the area of a triangle
o Python program to solve quadratic equation
o Python program to swap two variables
o Python program to generate a random number
o Python program to convert kilometers to miles
o Python program to convert Celsius to Fahrenheit
o Python program to display calendar

Python programs with conditions and loops


o Python Program to Check if a Number is Positive, Negative or Zero
o Python Program to Check if a Number is Odd or Even
o Python Program to Check Leap Year
o Python Program to Check Prime Number
o Python Program to Print all Prime Numbers in an Interval
o Python Program to Find the Factorial of a Number
o Python Program to Display the multiplication Table
o Python Program to Print the Fibonacci sequence
o Python Program to Check Armstrong Number
o Python Program to Find Armstrong Number in an Interval
o Python Program to Find the Sum of Natural Numbers

Python Function Programs


o Python Program to Find LCM
o Python Program to Find HCF
o Python Program to Convert Decimal to Binary, Octal and Hexadecimal
o Python Program To Find ASCII value of a character
o Python Program to Make a Simple Calculator
o Python Program to Display Calendar
o Python Program to Display Fibonacci Sequence Using Recursion
o Python Program to Find Factorial of Number Using Recursion

Python Native Data Type Programs


o Python Program to Add Two Matrices
o Python Program to Multiply Two Matrices
o Python Program to Transpose a Matrix
o Python Program to Sort Words in Alphabetic Order
o Python Program to Remove Punctuation From a String

Python Array Programs


o Python program to copy all elements of one array into another array
o Python program to find the frequency of each element in the array
o Python program to left rotate the elements of an array
o Python program to print the duplicate elements of an array
o Python program to print the elements of an array
o Python program to print the elements of an array in reverse order
o Python program to print the elements of an array present on even position
o Python program to print the elements of an array present on odd position
o Python program to print the largest element in an array
o Python program to print the smallest element in an array
o Python program to print the number of elements present in an array
o Python program to print the sum of all elements in an array
o Python program to right rotate the elements of an array
o Python program to sort the elements of an array in ascending order
o Python program to sort the elements of an array in descending order

Python Number Programs


o Python program to check if the given number is a Disarium Number
o Python program to print all disarium numbers between 1 to 100
o Python program to check if the given number is Happy Number
o Python program to print all happy numbers between 1 and 100
o Python program to determine whether the given number is a Harshad Number
o Python program to print all pronic numbers between 1 and 100
Python Circular Linked List Programs
o Python program to create a Circular Linked List of N nodes and count the number of
nodes
o Python program to create a Circular Linked List of n nodes and display it in reverse
order
o Python program to create and display a Circular Linked List
o Python program to delete a node from the beginning of the Circular Linked List
o Python program to delete a node from the end of the Circular Linked List
o Python program to delete a node from the middle of the Circular Linked List
o Python program to find the maximum and minimum value node from a circular
linked list
o Python program to insert a new node at the beginning of the Circular Linked List
o Python program to insert a new node at the end of the Circular Linked List
o Python program to insert a new node at the middle of the Circular Linked List
o Python program to remove duplicate elements from a Circular Linked List
o Python program to search an element in a Circular Linked List
o Python program to sort the elements of the Circular Linked List

Python Doubly Linked List Programs


o Python program to convert a given binary tree to doubly linked list
o Python program to create a doubly linked list from a ternary tree
o Python program to create a doubly linked list of n nodes and count the number of
nodes
o Python program to create a doubly linked list of n nodes and display it in reverse
order
o Python program to create and display a doubly linked list
o Python program to delete a new node from the beginning of the doubly linked list
o Python program to delete a new node from the end of the doubly linked list
o Python program to delete a new node from the middle of the doubly linked list
o Python program to find the maximum and minimum value node from a doubly linked
list
o Python program to insert a new node at the beginning of the Doubly Linked list
o Python program to insert a new node at the end of the Doubly Linked List
o Python program to insert a new node at the middle of the Doubly Linked List
o Python program to remove duplicate elements from a Doubly Linked List
o Python program to rotate doubly linked list by N nodes
o Python program to search an element in a doubly linked list

You might also like