0% found this document useful (0 votes)
4 views2 pages

Summer Holiday Homework 2025 Programs

Uploaded by

skg779760
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)
4 views2 pages

Summer Holiday Homework 2025 Programs

Uploaded by

skg779760
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
You are on page 1/ 2

Python Programs - Summer Holiday Homework 2025

1. Print Name, Class, and Section

name = input("Enter your name: ")


class_name = input("Enter your class: ")
section = input("Enter your section: ")

print("Name:", name)
print("Class:", class_name)
print("Section:", section)

2. Sum and Average of Two Integers

num1 = int(input("Enter first number: "))


num2 = int(input("Enter second number: "))

sum_result = num1 + num2


average = sum_result / 2

print("Sum:", sum_result)
print("Average:", average)

3. Area of a Circle

import math

radius = float(input("Enter the radius of the circle: "))


area = math.pi * radius * radius

print("Area of the circle:", area)

4. Perimeter and Area of a Rectangle

length = float(input("Enter the length of the rectangle: "))


width = float(input("Enter the width of the rectangle: "))

perimeter = 2 * (length + width)


area = length * width

print("Perimeter of the rectangle:", perimeter)


print("Area of the rectangle:", area)

5. Simple Interest Calculation

principal = float(input("Enter the principal amount: "))


rate = float(input("Enter the rate of interest: "))
time = float(input("Enter the time in years: "))

simple_interest = (principal * rate * time) / 100


print("Simple Interest:", simple_interest)

You might also like