ACKNOWLEDGEMENT
I would like to express my heartfelt gratitude to
Ms. Rubeka Sharma, our esteemed Artificial
Intelligence teacher, for providing us with the
invaluable opportunity to create a project on the
topic of Python. Her guidance, encouragement,
and dedication to fostering our learning have
been truly inspiring throughout this journey.
This project has not only enhanced my
understanding of Python but also allowed me to
develop critical skills in programming and
problem-solving. I deeply appreciate her efforts
in making this learning experience both
enriching and engaging.
Thank you once again, Ms. Rubeka Sharma, for
your unwavering support and belief in our
potential.
INDEX
1. Write a program to calculate the area of a rectangle.
Input: Length and Breadth of the rectangle.
Output: Area of the rectangle.
2. Write a Python program to find the average of three numbers.
Input: Three numbers from the user.
Output: Average of the numbers.
3. Create a program to convert temperature from Celsius to Fahrenheit.
Formula: F=C×95+32F = C \times \frac{9}{5} + 32F=C×59+32.
Input: Temperature in Celsius.
Output: Temperature in Fahrenheit
4. Write a Python script to calculate the simple interest. Formula: SI=P×R×T100SI = \frac{P \times R
\times T}{100}SI=100P×R×T.
Input: Principal, Rate of Interest, and Time.
Output: Simple Interest.
5 Develop a program to swap two numbers using a third variable.
Input: Two numbers.
Output: Numbers after swapping.
If-Else Statements
6. Write a program to check if a number is even or odd.
Input: A single number.
Output: "Even" if even, "Odd" otherwise.
7. Create a Python program to check if a number is positive, negative, or zero.
Input: A number from the user.
Output: Whether the number is Positive, Negative, or Zero
8. Write a program to find the largest of three numbers.
Input: Three numbers.
Output: The largest number
9. Develop a Python script to determine if a year is a leap year.
Leap Year Rule: Divisible by 4 but not divisible by 100 unless also divisible by 400.
Input: Year.
Output: "Leap Year" or "Not a Leap Year."
10.Create a program to determine the grade of a student based on marks.
Grading Rules:
o Marks ≥ 90: Grade A
o 80 ≤ Marks < 90: Grade B
o 70 ≤ Marks < 80: Grade C
o Marks < 70: Grade D Input: Marks.
Output: Grade.
While Loop
11 . Write a program to print the multiplication table of a number.
Input: A number nnn
Output: Multiplication table from n×1n \times 1n×1 to n×10n \times 10n×10.
12. Develop a Python script to calculate the sum of the first nnn natural numbers.
Input: Number nnn.
Output: Sum of 1+2+…+n1 + 2 + \ldots + n1+2+…+n.
13. Create a program to reverse a given number.
Input: A number.
Output: Reversed number.
14. Write a Python program to count the number of digits in a number .
Input: A number.
Output: Total digits.
15. Develop a script to check if a number is a palindrome
. Palindrome Rule: A number is a palindrome if it reads the same backward as forward.
Input: A number.
Output: "Palindrome" or "Not a Palindrome."