Ip Project
Ip Project
Output :
2) Input
cost = float(input("Enter the cost price: "))
perc = float(input("Enter the discount percentage: "))
Output :
3) Input :
l = float(input("Enter the length of the rectangle: "))
b = float(input("Enter the breadth of the rectangle: "))
area = l * b
peri = 2 * (l + b)
print("\nResults:")
print("Area of the rectangle: ", area)
print("Perimeter of the rectangle: ", peri)
Output :
4) Input :
amount = float(input("Enter the principal amount: "))
time = float(input("Enter the time : "))
rate = float(input("Enter the rate of interest : "))
Output :
5) Input :
cost = float(input("Enter the cost price: "))
selling= float(input("Enter the selling price: "))
Output :
6) Input :
cgst = gst / 2
Output :
7) Input :
num = int(input("Enter a number: "))
sum1 = 0
if sum1 == num:
print(num," is a perfect number.")
else:
print(num," is not a perfect number.")
Output :
8) Input :
small = min(numbers)
large = max(numbers)
Output :
9) Input :
if len(num) < 3:
print("The list must contain at least three numbers.")
else:
num.sort(reverse=True)
thirdlarge = num[2]
Output :
10) Input :
sums = 0
print("The sum of squares of the first 100 natural numbers is: ",sums)
Output :
11) Input :
Output :
12) Input :
count = numb.count(n)
Output :
13) Input :
statecap = {}
print("Enter the names of 10 states and their capitals:")
for i in range(10):
state = input(f"Enter the name of state {i + 1}: ")
capital = input(f"Enter the capital of {state}: ")
statecap[state] = capital
Output :
14) Input :
students = {}
num = int(input("Enter the number of students: "))
for i in range(num):
print(f"\nEntering data for student {i + 1}:")
name = input("Enter the name of the student: ")
marks = {}
students[name] = marks
print("\nStudent Data:")
for name, marks in students.items():
print(name,':' ,marks)
Output :