0% found this document useful (0 votes)
45 views3 pages

100 Beginner Python Programs Guide

The document lists 100 basic Python programs suitable for beginners, organized into six categories: basic printing and variables, input and simple calculations, decision making with if/else statements, loops with for and while, and pattern printing. Each category contains a series of tasks that help users practice fundamental programming concepts and skills. The programs cover a wide range of topics, including arithmetic operations, condition checks, loops, and pattern generation.

Uploaded by

Shanu Shanu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views3 pages

100 Beginner Python Programs Guide

The document lists 100 basic Python programs suitable for beginners, organized into six categories: basic printing and variables, input and simple calculations, decision making with if/else statements, loops with for and while, and pattern printing. Each category contains a series of tasks that help users practice fundamental programming concepts and skills. The programs cover a wide range of topics, including arithmetic operations, condition checks, loops, and pattern generation.

Uploaded by

Shanu Shanu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

100 BASIC PYTHON PROGRAMS – BEGINNER LEVEL

1. BASIC PRINTING & VARIABLES (1–10)


1. Print "Hello, World!".
2. Print your name and age.
3. Add two numbers and print the result.
4. Multiply two numbers entered by the user.
5. Swap two numbers using a temporary variable.
6. Swap two numbers without using a temporary variable.
7. Find the square of a number.
8. Find the cube of a number.
9. Calculate area of a rectangle.
10. Calculate area of a circle.

2. INPUT & SIMPLE CALCULATIONS (11–20)


11. Convert Celsius to Fahrenheit.
12. Convert kilometers to miles.
13. Convert hours to minutes and seconds.
14. Calculate the perimeter of a rectangle.
15. Calculate the simple interest.
16. Calculate the compound interest.
17. Calculate the average of three numbers.
18. Find the remainder when one number is divided by another.
19. Find the power of a number.
20. Calculate the Body Mass Index (BMI).

3. DECISION MAKING – IF/ELSE (21–40)


21. Check if a number is positive, negative, or zero.
22. Check if a number is even or odd.
23. Check if a number is divisible by 5.
24. Check if a number is divisible by both 3 and 7.
25. Find the largest of two numbers.
26. Find the largest of three numbers.
27. Check if a year is a leap year.
28. Check if a person is eligible to vote (age ≥ 18).
29. Check if a character is a vowel or consonant.
30. Check if a character is uppercase or lowercase.
31. Check if a character is a digit or not.
32. Check if three angles form a valid triangle.
33. Classify a triangle as equilateral, isosceles, or scalene.
34. Check if a number is in the range 1–100.
35. Check if two numbers are equal.
36. Check if a student has passed or failed based on marks.
37. Calculate grade based on marks.
38. Check if a number is a multiple of another number.
39. Check if a given alphabet is in uppercase A–Z.
40. Check if the entered password is correct.

4. LOOPS – FOR LOOP (41–65)


41. Print numbers from 1 to 10.
42. Print numbers from 10 to 1.
43. Print even numbers between 1 and 20.
44. Print odd numbers between 1 and 20.
45. Print multiplication table of 5.
46. Print multiplication table of a user-given number.
47. Find the sum of first n natural numbers.
48. Find the sum of even numbers up to n.
49. Find the sum of odd numbers up to n.
50. Find the factorial of a number (for loop).
51. Print squares of numbers from 1 to 10.
52. Print cubes of numbers from 1 to 10.
53. Display all numbers divisible by 9 from 1 to 100.
54. Display all numbers divisible by 3 and 5 between 1 and 100.
55. Print all prime numbers between 1 and 50.
56. Check if a number is prime.
57. Find the sum of prime numbers between 1 and n.
58. Display Fibonacci series up to n terms.
59. Print the reverse of numbers from n to 1.
60. Display ASCII values of A to Z.
61. Display ASCII values of a to z.
62. Find the sum of squares of first n natural numbers.
63. Find the product of numbers from 1 to 5.
64. Display all multiples of 7 up to 100.
65. Count how many numbers between 1 and 100 are divisible by both 2 and 5.

5. LOOPS – WHILE LOOP (66–85)


66. Print numbers from 1 to 10 using while loop.
67. Print numbers from 10 to 1 using while loop.
68. Find sum of first n numbers using while loop.
69. Reverse a number.
70. Count the number of digits in a number.
71. Find the sum of digits of a number.
72. Find the product of digits of a number.
73. Find the largest digit in a number.
74. Find the smallest digit in a number.
75. Check if a number is palindrome.
76. Check if a number is Armstrong.
77. Display all Armstrong numbers between 1 and 500.
78. Find the sum of even digits in a number.
79. Find the sum of odd digits in a number.
80. Display Fibonacci series using while loop.
81. Find GCD of two numbers (Euclid’s method).
82. Find LCM of two numbers.
83. Print all factors of a number.
84. Find the sum of factors of a number.
85. Check if a number is perfect (sum of factors = number).

6. PATTERN PRINTING (86–100)


86. Print a square of stars (5×5).
87. Print a rectangle of stars (3×7).
88. Print a right-angled triangle of stars.
89. Print an inverted right-angled triangle of stars.
90. Print a triangle of numbers.
91. Print an inverted triangle of numbers.
92. Print a pyramid of stars.
93. Print an inverted pyramid of stars.
94. Print Floyd’s Triangle.
95. Print Pascal’s Triangle.
96. Print a hollow square of stars.
97. Print a hollow rectangle of stars.
98. Print a diamond of stars.
99. Print multiplication tables from 1 to 10.
100. Print a pattern of increasing alphabets.

You might also like