*SSLC mark and percentage calculator program in Python
*
tamil = input("Tamil Mark please: ")
english = input("English Mark please: ")
maths = input("Maths Mark please: ")
science = input("Science Mark please: ")
social = input("Social Mark please: ")
result = int(tamil) + int(english) + int(maths) + int(science) + int(social)
print("total mark is:",result)
print("percentage is:",(result)*(100/500),'%')
result
`
Tamil Mark please: 90
English Mark please: 85
Maths Mark please: 85
Science Mark please: 90
Social Mark please: 90
total mark is: 440
percentage is: 88.0 %
`
BMI calculator program in Python
Weight = int(input("Enter your weight: "))
Hight = float(input("Enter your height: "))
def bmiCal(Weight,Height):
bmi = Weight/float(Height*Height)
result = ''
if bmi < 18.50:
result = 'under weight'
elif bmi >=18.50 and bmi <= 24.9:
result = 'healthy weight'
elif bmi >=25 and bmi <= 29.9:
result = 'over weight'
elif bmi >=30:
result = 'obesity'
return result
print(bmiCal(Weight,Hight))
result
Enter your weight: 60
Enter your height: 1.65
healthy weight
EB calculator
simple calculate
units = int(input("Enter no of units consumed :"))
price = int(input("Enter the price per unit : "))
def calculate(units,price):
return units*price
result = calculate(units,price)
print("Total price is : ",result )
result
Enter no of units consumed :100
Enter the price per unit : 3
Total price is : 300
Top comments (0)