Python Programs: Basic
- Python program to print “Hello World!”
- Python program to read dta from keyboard
- Python program to add two numbers
- Python program to find average of two numbers
- Python program to find absolute value of number
- Python program to print number, its square and cube
- Python program to demonstrate use of formatting (%0.2d, %0.4f)
- Python program to demonstrate use of data types (int, float, char, double)
- Python program to print size of all data types
- Python program to print ASCII value of entered character
- Python program to convert case of entered character
Python Programs: Operators
- Python program to demonstrate various arithmetic operation (+, -, *, /, %, ^)
- Python program to demonstrate comparison operator (<, >, <=, >=, ==, !=)
- Python program to demonstrate logical operator (&&, ||, ! )
- Python program to demonstrate increment / decrement operator (++, –)
- Python program to demonstrate compound operator (+=, -=, *=, /=)
- Python program to demonstrate bit wise operator (&, |, <<, >>, ~)
- Python program to demonstrate ternary operator (?)
- Python program to find quotient and remainder of number
- Python program to swap two numbers
- Python program to Add two different time
Python Programs: Area and Volume
- Python program to Find area of circle
- Python Program to Find Area of Semi Circle
- Python Program to Find Diameter, Circumference and Area of Circle
- Python Program to Find Area of Triangle
- Python Program to Find Third Angle of Triangle
- Python Program to Find Area of an Isosceles Triangle
- Python Program to Find Area of an Equilateral Triangle
- Python Program to Find the Perimeter of a Square
- Python Program to Find Area of Rectangle
- Python Program to Find Perimeter of Rectangle
- Python Program to Find Area of a Parallelogram
- Python Program to Find Area of a Rhombus
- Python Program to Find Perimeter of a Rhombus
Python Programs: Volume and Surface
- Python Program to Compute Volume and Surface Area of a Cube
- Python Program to Compute Volume and Surface Area of a Cuboid
- Python Program to Compute Volume and Surface Area of a Cone
- Python Program to Compute Volume and Surface Area of Sphere
- Python Program to Compute Volume and Surface Area of a Cylinder
Python Programs: Equations
- Python Program to Find Roots of Quadratic Equation
- Python Program to Compute Area of Circle
- Python Program to Compute Simple Interest
- Python Program to Compute Gross Salary From Basic, DA and HRA
- Python Program to Convert From Celsius to Fahrenheit
- Python Program to Convert From Fahrenheit to Celsius
- Python Program to Convert Minutes to Hours
- Python Program to Convert Days to Year, Month, Week and day
Python Programs: If-Else
- Python Program to Check if Given Number is Positive
- Python Program to Check if Given Number is Positive or Negative
- Python Program to Check if Given Character is Vowel or Consonant
- Python Program to Check Given Year is Leap Year or Not
- Python Program to Check if Given Number is Odd or Even
- Python Program to Find Maximum Number From Two Numbers
- Python Program to Scan Age of Candidate and Print if He/She is Eligible for Driving Licence or Not
- Python Program to Print Gender (‘F’, ‘f’: Female,…)
- Python Program to Check Type of Triangle
- Python Program to Check if Triangle is Valid or Not using Angles
- Python Program to Check if Triangle is Valid or Not using Sides
- Python Program to Find Largest of Three Numbers.
- Python Program to Print the Grade Based on Percentage
- Python Program to Check if Given Number is Integer or Float
Python Programs: Patterns
Pattern 1:
* * *
* * *
* * *
Pattern 2:
* * *
* *
* * *
Pattern 3:
* * * * * *
* * * * * *
* * * * * *
Note: Python version of the following programs will be available soon, Stay Tuned!
C Programs: Switch-Case
- C Program to Check if Given Number is Odd or Even using Switch Case
- C Program to Print Day Based on Given Number using Switch Case
- C Program to Print Gender using Switch Case (‘F’, ‘f’: Female,…)
- C Program to Implement Calculator Using Switch Case
C Programs: For Loop
- C Program to Print “Hello world” 10 Times using For loop
- C Program to Print First n Numbers using For loop
- C Program to Print First n Numbers in Reverse Order using For loop
- C Program to print odd numbers between 1 to n using For loop
- C Program to print first n odd numbers using For loop
- C Program to Add All Numbers up To n using For loop (1 + 2 + 3 + …. + n)
- C Program to display a-z characters using For loop
- C Program to print multiplication table of 5 using For loop (5 x 1 = 5)
- C Program to print multiplication table of n up to m using For loop
- C Program to Find Factorial of n using For loop
- C Program to Print Fibonacci Series using For loop
- C Program to print nPr using For loop
- C Program to print nCr using For loop
- C Program to count number of digits in given number using For loop
- C Program to Add Digits of Number using For loop
- C Program to print First Digit of Number using For loop
- C Program to print First and Last Digit of a Number using For loop
- C Program to Swap First and Last Digit of a Number using For loop
- C Program to Reverse The Number using For loop
- C Program to Print Numbers Between 1 and n Divisible By m using For loop
- C Program to Print All Divisor of Number using For loop
- C Program to Check if Given Number is Prime or Not using For loop
- C Program to Print First n Prime Numbers using For loop
- C Program to Print All Prime Numbers Between 1 and n using For loop
- C Program to Print All Prime Numbers Between n and m using For loop
- C Program to Check If Given Number is Palindrome or Not using For loop
- C Program to Print First n Palindrome Numbers using For loop
- C Program to Print All Palindrome Numbers Between 1 and n using For loop
- C Program to Print All Palindrome Numbers Between n and m using For loop
- C Program to Check if Give Number is Armstrong or Not using For loop
- C Program to Print First n Armstrong Numbers using For loop
- C Program to print all Armstrong numbers Between 1 and n using For loop
- C Program to print all Armstrong numbers Between n and m using For loop
- C Program to Check the Number is a Krishnamurthy Number using For loop
- C Program to Check if Given Number is Perfect Square or Not using For loop
- C Program to Check Number is a Prime, Armstrong, or Perfect Square using For loop
- C Program to Print if Numbers Are Same or Not by Comparing Individual Digits. using For loop
- C Program to Find GCD Two Numbers using For loop
- C Program to Find LCM of Two Numbers using For loop
- C Program to Find All Factors of Number using For loop
- C Program to Find Prime Factors of Number using For loop
C Programs: While Loop
- Write C Program to Print “Hello world” 10 Times using While loop
- Write C Program to Print First n Numbers using While loop
- Write C Program to Print First n Numbers in Reverse Order using While loop
- Write C Program to print odd numbers between 1 to n using While loop
- Write C Program to print first n odd numbers using While loop
- Write C Program to Add All Numbers up To n using While loop (1 + 2 + 3 + …. + n)
- Write C Program to display a-z characters using While loop
- Write C Program to print multiplication table of 5 using While loop (5 x 1 = 5)
- Write C Program to print multiplication table of n up to m using While loop
- Write C Program to Find Factorial of n using While loop
- Write C Program to Print Fibonacci Series using While loop
- Write C Program to print nPr using While loop
- Write C Program to print nCr using While loop
- Write C Program to count number of digits in given number using While loop
- Write C Program to Add Digits of Number using While loop
- Write C Program to print First Digit of Number using While loop
- Write C Program to print First and Last Digit of a Number using While loop
- Write C Program to Swap First and Last Digit of a Number using While loop
- Write C Program to Reverse The Number using While loop
- Write C Program to Print Numbers Between 1 and n Divisible By m using While loop
- Write C Program to Print All Divisor of Number using While loop
- Write C Program to Check if Given Number is Prime or Not using While loop
- Write C Program to Print First n Prime Numbers using While loop
- Write C Program to Print All Prime Numbers Between 1 and n using While loop
- Write C Program to Print All Prime Numbers Between n and m using While loop
- Write C Program to Check If Given Number is Palindrome or Not using While loop
- Write C Program to Print First n Palindrome Numbers using While loop
- Write C Program to Print All Palindrome Numbers Between 1 and n using While loop
- Write C Program to Print All Palindrome Numbers Between n and m using While loop
- Write C Program to Check if Give Number is Armstrong or Not using While loop
- Write C Program to Print First n Armstrong Numbers using While loop
- Write C Program to print all Armstrong numbers Between 1 and n using While loop
- Write C Program to print all Armstrong numbers Between n and m using While loop
- Write C Program to Check the Number is a Krishnamurthy Number using While loop
- Write C Program to Check if Given Number is Perfect Square or Not using While loop
- Write C Program to Check Number is a Prime, Armstrong, or Perfect Square using While loop
- Write C Program to Check if All Digits of Number Are Same or Not using While loop
- Write C Program to Find GCD Two Numbers using While loop
- Write C Program to Find LCM of Two Numbers using While loop
- Write C Program to Find All Factors of Number using While loop
- Write C Program to Find Prime Factors of Number using While loop
C Programs: Do-While Loop
- Write C Program to Demonstrate Use of do-while loop
- Write Menu Based C Program to Implement Simple Calculator using do-while loop
- Write Menu Based C Program to Print First 10 Positive or Negative Numbers using do-while loop
- Write Menu Based C Program to Convert Current Time to Different Time Zone using do-while loop
C Programs: Number System / Base Conversion
- Write C Program to Convert Decimal to Binary
- Write C Program to Convert Decimal to Octal
- Write C Program to Convert Decimal to Hexadecimal
- Write C Program to Convert Binary to Decimal
- Write C Program to Convert Binary to Octal
- Write C Program to Convert Binary to Hexadecimal
- Write C Program to Convert Octal to Binary
- Write C Program to Convert Octal to Decimal
- Write C Program to Convert Octal to Hexadecimal
- Write C Program to Convert Hexadecimal to Binary
- Write C Program to Convert Hexadecimal to Octal
- Write C Program to Convert Hexadecimal to Decimal
C Programs: Array
- Write C Program to Initialize an Array in Program and Print it
- Write C Program to Scan and Print Array of Size n
- Write C Program to Print Array in Reverse Order
- Write C Program to Find Number of Elements in Array
- Write C Program to Find an Element From an Array (Linear Search)
- Write C Program to Add All the Elements of an Array
- Write C Program to Find Average of Elements of an Array
- Write C Program to find Mean, Variance and Standard Deviation of an Array
- Write C Program to Check if Given Array is Sorted or Not
- Write C Program to Find Maximum and Minimum From Array
- Write C Program to Find Second Smallest and Second Largest Element from an Array
- Write C Program to Count Positive, Negative and Zeros in an Array
- Write C Program to Sum Positive and Negative Elements in Array
- Write C Program to Compare Two Arrays
- Write C Program to Count Odd and Even Numbers in Given Array
- Write C Program to Count Occurrence of Given Element in an Array
- Write C Program to Replace Array Elements by Given Value
- Write C Program to Delete Duplicate Element From an Array
- Write C Program to Delete Element From an Array by Value
- Write C Program to Delete Element From an Array by Location
- Write C Program to Insert an element in an Array at Given Location
- Write C Program to Implement Binary Search
C Programs: Matrix
- Write C Program to Initialize 3 x 3 Matrix and Print it
- Write C Program to Scan and Print 3 x 3 Matrix
- Write C Program to Add Two Matrices of Size 3 X 3.
- Write C Program to Multiply Two Matrices of Size 3 X 3.
- Write C Program to Find Norm and Trace of Matrix of Size 3 X 3.
- Write C Program to Find Row Sum and Column Sum of Matrix of Size 3 X 3.
- Write C Program to Find Sum of Diagonal, and Non Diagonal Elements of 3X3 Matrix
- Write C Program to Traverse Matrix Helically.
- Write C Program to Check if Given Matrix is Magic Matrix or Not
- Write C Program to Print Lower and Upper Triangle of Matrix
- Write C Program to Compute Transpose of Matrix
C Programs: String
- Write C Program to Initialize and Print String
- Write C Program to Scan and Print String
- Write C Program to Demonstrate the Use of gets() Function
- Write C Program to Find Length of String
- Write C Program to Reverse String
- Write C Program to Count Number of Occurrence of Character in String
- Write C Program to Compare Two Strings
- Write C Program to Copy String in Another String
- Write C Program to Concat Two Strings
- Write C Program to Check if Given String is Palindrome or Not
- Write C Program to Delete White Spaces From the String
- Write C Program to Remove all Vowels From String
- Write C Program to Count Vowel, Consonant and White Space from String.
- Write C Program to Convert String in Upper Case, Lower Case and Toggle Case
- Write menu-driven Program to Convert String in Upper Case, Lower Case and Toggle Case using do-while loop
- Write C Program to Delete Given Character From the String
- Write C Program to Insert Sub String at Specific Location
- Write C Program to Find Sub String from the Given String
- Write C Program to Count Occurrence of Word in Given String
- Write C Program to Remove Given Word From the String
- Write C Program to check valid username and password (print: success or failure)
Python Programs: Recursion
- Write Python Program to Print First N Numbers using Recursion
- Write Python Program to Add Two Numbers using Recursion
- Write Python Program to Add Digits of Number using Recursion
- Write Python Program to Find Factorial of Number Using Recursion
- Write Python Program to Find Fibonacci Series Using Recursion
- Write Python Program to Find Maximum Number From Array Using Recursion
- Write Python Program to Add First n Numbers using Recursion
- Write Python Program to Find Sum of All Array Elements Using Recursion
- Write Python Program to Search Element From Array Using Recursion
- Write Python Program to perform Binary Search using Recursion
- Write Python Program to Find GCD of Two Numbers using Recursion
- Write Python Program to Find LCM of Two Numbers using Recursion
- Write Python Program to Find the Sum of Natural Numbers using Recursion
- Write Python Program to Reverse a Number Using Recursion
- Write Python Program to Reverse a String Using Recursion
- Write Python Program to Check if Given Number is Palindrome or Not using Recursion
- Write Python Program to Check if Given String is Palindrome or Not using Recursion
- Write Python Program to Calculate the Power using Recursion