Program:: Student Marksheet Report
Program:: Student Marksheet Report
AIM:'
To write a Python program to generate the marksheet report for the given ve subject
marks.
PROGRAM:
RESULT:
Thus the program is executed and the result is veri ed.
fl
fl
fl
fl
fl
fl
fi
fi
CALCULATION OF SALE PRICE FOR AN ITEM
AIM:
To write a Python program to calculate the sale price of an item for the given cost and
discount.
PROGRAM
RESULT:
Thus the program is executed and the result is veri ed.
fl
fl
fi
CALCULATION FOR PERIMETER AND AREA OF SHAPES
AIM:
To write a Python program to calculate the perimeter and area of the shapes
PROGRAM:
import math
if choice == 1 :
perimeter_circle = 2*3.14*radius
area_circle = 3.14*radius*radius
elif choice == 2 :
area_square= side*side
perimeter_square= 4*side
elif choice == 3 :
perimeter_rectangle=2*(length+breadth)
area_rectangle=length*breadth
elif choice == 4 :
perimeter_triangle = int(side1+side2+side3)
side = perimeter_triangle/2
area_triangle=(side*(side-side1)*(side-side2)*(side-side3))**0.5
RESULT:
AIM:
To write a Python program to calculate the simple and compound interest for the given
amount, period and interest.
PROGRAM
import math
simple_interest= oat((principal_amount*time_period*rate_of_interest)/100)
RESULT:
Thus the program is executed and the result is veri ed.
AIM:
To write a Python program to calculate the pro t and loss for the given cost price and
selling price
PROGRAM
# Program to calculate the pro t and loss for thr given CP and SP
if costprice>sellingprice :
Loss= oat(costprice-sellingprice)
print("Loss:", Loss)
elif sellingprice>costprice :
Pro t= oat(sellingprice-costprice)
RESULT:
Thus the program is executed and the result is veri ed.
fi
fl
fl
fi
fl
fl
fl
fl
fl
fl
fi
fi
fi
fi
fi
CALCULATION OF EMI(Estimated Monthly Interest)
AIM:
To write a Python program to calculate the EMI for the given principal amount, interest
and the tenure.
PROGRAM:
#Calculation of EMI
Amount=int(input("Enter the principal amount:"))
Annual_interest= oat(input("Enter the Annual interest:"))
Tenure=int(input("Enter the time period in years"))
tenure_in_months=Tenure*12
monthly_interest_rate=Annual_interest/(12*100)
#EMI = p * r * (1+r)^n/((1+r)^n-1)
EMI = Amount * monthly_interest_rate * (1+monthly_interest_rate)**tenure_in_months/
((1+monthly_interest_rate)**tenure_in_months-1)
print("EMI:",EMI)
RESULT:
Thus the program is executed and the result is veri ed.
AIM:
To write a Python program to calculate the tax(GST) for the purchased item and thus the
bill value of the item.
PROGRAM:
#Calculation of GST
item_name=input("Enter the item_name:")
price=int(input("Enter the price:"))
gst_rate= oat(input("Enter the gst rate in % : "))
cgst= oat(gst_rate/2*100)
sgst= oat(gst_rate/2*100)
print("CGST:", gst_rate/2,"%")
print("SGST:", gst_rate/2,"%")
total_value= oat(price+cgst+sgst)
print("Bill value for the item:",total_value)
RESULT:
Thus the program is executed and the result is veri ed.
fl
fl
fl
fl
fl
fi
fi
SUM OF THE SQUARE OF FIRST 100 NATURAL NUMBERS
AIM:
To write a Python program to calculate the sum of the square of first 100 natural numbers
PROGRAM:
RESULT:
Thus the program is executed and the result is veri ed.
AIM
To write a Python program to retrieve the largest and smallest number in a given list.
PROGRAM
RESULT:
The program is executed and the result is veri ed.
fi
fi
AIM
To write a Python program to retrieve the third largest and smallest number in a given list.
PROGRAM
RESULT:
The program is executed and the result is veri ed.
AIM
PROGRAM
RESULT:
The program is executed and the result is veri ed.
fi
fi
AIM
To write a Python program to display the number of vowels in the given string
PROGRAM
RESULT:
The program is executed and the result is veri ed.
AIM
PROGRAM
RESULT:
The program is executed and the result is veri ed.
fi
fi
AIM
To write a Python program to add the items in the dictionary as state and their
capitals.
PROGRAM
mydict = {}
no = int(input("Enter the Number of states to be added:"))
for i in range(0,no) :
states = input("Enter the state name:")
capital = input("Enter the capital:")
mydict[states]=capital
print("Items in dictionary are:",mydict)
RESULT:
The program is executed and the result is veri ed.
AIM
To write a Python program to retrieve the highest and lowest values in the
dictionary.
PROGRAM
mydict = {}
no = int(input("Enter the Number of items to be added:"))
for i in range(0,no) :
key= input("Enter the key:")
value = int(input("Enter the values:"))
mydict[key] = value
print("Items in dictionary are:",mydict)
values=mydict.values()
print("The highest value in the dictionary:",max(values))
print("The lowest value in the dictionary:",min(values))
RESULT:
The program is executed and the result is veri ed.
fi
fi