Python Basic Programs

This section contains Python basic programs, demonstrating the examples on basic concepts such as conditional statement, control statement, small project programs, etc.

List of Python Basic Programs

  1. Python Program to Print Hello World
  2. How to print spaces in Python?
  3. Python | Printing different messages by using different variations of print() method
  4. Python program to print given text using a user-defined method
  5. Python | Printing different values (integer, float, string, Boolean)
  6. Python | Declare different types of variables, print their values, types and Ids
  7. Python program to demonstrate variables scope
  8. Determine the type of an object in Python
  9. Create number variables (int, float and complex) and print their types and values in Python
  10. Create integer variable by assigning binary value in Python
  11. Create integer variable by assigning octal value in Python
  12. Create integer variable by assigning hexadecimal value in Python
  13. Python | Typecasting Input to Integer, Float
  14. How to check multiple variables against a value in Python?
  15. Python program to define an integer value and print it
  16. Python | Input two integers and find their addition
  17. Python program to find sum of two numbers
  18. Different Methods for Adding Two Numbers in Python
  19. Python Arithmetic Operators: Usage, Types, and Example
  20. Python program to find maximum of two numbers
  21. Python program to find the area and perimeter of a circle
  22. Python program to find ASCII value of a character
  23. Simple Interest Program in Python
  24. Python program for compound interest
  25. Python program to check the given year is a leap year or not
  26. Simple pattern printing programs in Python
  27. Check a given number is a Fibonacci term or not in Python
  28. Find Power of a Number using Exponential (**) Operator in Python
  29. Python program to find the power of a number using loop
  30. Python program to find the power of a number using recursion
  31. Extract and print digits in reverse order of a number in Python
  32. Reverse Number Program in Python
  33. Python program to find floor division
  34. Python if, if...else Statement Examples
  35. Python | Input age and check eligibility for voting
  36. Python | Find largest of three number using nested if else
  37. Python | Calculate discount based on the sale amount
  38. Percentage Discount Calculator in Python
  39. Ternary Operator Program in Python
  40. Python | Design a simple calculator using if elif (just like switch case)
  41. For Loop Program in Python
  42. For Each Loop Example in Python
  43. Python | Examples of Loops Based on Control Type
  44. Python Looping Example Programs
  45. How to Break a Loop in Python?
  46. How to End Current Iteration, and Continues to Next in Python Loops?
  47. What is the Pass Statement in Python for Loop?
  48. Python | Program to print numbers from N to 1 (use range() with reverse order)
  49. Python | Print all numbers between 1 to 1000 which are divisible by 7 and must not be divisible by 5
  50. Python | Calculate square of a given number (3 different ways)
  51. Python | Find factorial of a given number (2 different ways)
  52. Python | Find the factorial of a number using recursion
  53. Find Square and Cube of a Number in Python
  54. Python | Declare any variable without assigning any value
  55. BMI (Body Mass Index) Calculator in Python
  56. Find Odd and Even Numbers from the List of Integers in Python
  57. Python | Program to print Palindrome numbers from the given list
  58. Bank Management System Program in Python
  59. Python | Count total number of bits in a number
  60. Python | Generate Random Numbers Using NumPy Library
  61. Generate random integers between 0 and 9 in Python
  62. Python Program for n-th Fibonacci Number
  63. Python program for sum of square of first N natural numbers
  64. Python program for sum of cube of first N natural numbers
  65. Python program to check prime number
  66. Python program to find the largest prime factor of a number
  67. Python Program for Sieve of Eratosthenes
  68. Python program to count prime numbers up to N (Different Methods)
  69. Python program to print all prime numbers in an interval
  70. Python program to print all positive or negative numbers in a range
  71. Python program for not None test
  72. Python program for pass statement
  73. Python program for Zip, Zap and Zoom game
  74. Python program to convert temperature from Celsius to Fahrenheit and vice-versa
  75. Python program to find the number of required bits to represent a number in O(1) complexity
  76. Python program to count number of trailing zeros in Factorial of number N
  77. Python program for swapping the value of two integers
  78. Python program for swapping the value of two integers without third variable
  79. Python program to find winner of the day
  80. Python program for Tower of Hanoi
  81. Python program to find standard deviation
  82. Python program to find the variance
  83. Python program Tower of Hanoi (modified)
  84. Python program to convert Centimeter to Inches
  85. Python program to convert meters into yards
  86. Python program to convert yards into meters
  87. Python program to capitalize the character without using a function
  88. Python program to lowercase the character without using a function
  89. Python program to find perfect number
  90. Python program to print perfect numbers from the given list of integers
  91. Python program to find greatest integer using floor() method
  92. Python program to find the maximum EVEN number
  93. Python program to find the maximum ODD number
  94. Python program to find the solution of a special sum series
  95. Python | Convert the binary number to decimal without using library function
  96. Python | Convert the decimal number to binary without using library function
  97. Create a stopwatch using Python
  98. Python program to find the maximum multiple from given N numbers
  99. Python program to find the least multiple from given N numbers
  100. Find the roots of the quadratic equation in Python
  101. Python program to check the given Date is valid or not
  102. Python program to print the calendar of any year
  103. Find all Prime numbers less than or equal to N using the Sieve of Eratosthenes algorithm in Python
  104. Find the sum of all prime numbers in Python
  105. Print the all uppercase and lowercase alphabets in Python
  106. Find the N-th number which is both square and a cube of a number in Python
  107. Program to find the execution time of a program in Python
  108. Program to find the x-intercept and y-intercept of a line passing through the given point in Python
  109. Find the day of the week for a given date in the past or future in Python
  110. Find the number of integers from 1 to n which contains digits 0's in Python
  111. Check whether a number is a power of another number or not in Python
  112. Check whether the binary representation of a given number is a palindrome or not in Python
  113. Draw a pie chart that shows our daily activity in Python
  114. Find the sum of all numbers below 1000 which are multiples of 3 or 5 in Python
  115. Python | How can I force division to be floating point? Division keeps rounding down to 0?
  116. Python program to declare a function and call it
  117. Python program to call a function before declaring it - Is it possible?
  118. Python program to call a function using keyword argument
  119. Python program to pass function as an argument
  120. Python program for passing multiple arguments to a function
  121. Python program to call methods from main() method
  122. Python program to return function from another function
  123. Python program to pass parameters to a function
  124. Create a function to check EVEN or ODD in Python
  125. Create a function to return the absolute the given value in Python
  126. Python program to define an empty function using pass statement
  127. Python program to design a dice throw function
  128. Python program to design a biased dice throw function
  129. Python program to design a biased coin flip function
  130. Python program to design a coin flip function
  131. Python program to print the list of all keywords
  132. Python program to print the version information
  133. Python program to find sum of all digits of a number
  134. Print number with commas as thousands separators in Python
  135. Python program to demonstrate logical errors
  136. Python program to print table of number entered by user
  137. Python program to calculate currency notes required to get the amount
  138. Python program to calculate discount based on selling price
  139. Python program to calculate gross pay (Hourly paid employee)
  140. Python program to get employee details and search for record by ID, surName or Designation
  141. Python program for Basic Shop Management System
  142. Python program to import modules – different Methods

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.