Programs

varatha

varatharajan

Posted on November 18, 2024

Programs

*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),'%')

Enter fullscreen mode Exit fullscreen mode

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

Image description

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))
Enter fullscreen mode Exit fullscreen mode

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 )

Enter fullscreen mode Exit fullscreen mode

result

Enter no of units consumed :100
Enter the price per unit : 3
Total price is : 300

💖 💪 🙅 🚩
varatha
varatharajan

Posted on November 18, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related