#find unique elements from a list:
def unique_list(list):
result = []
for item in list:
if item not in result:
[Link](item)
return result
lst = [1, 2, 3, 2, 5, 3, 1, 9]
print(unique_list(lst))
#Count the number of vowels:
def vowel_count(str):
count = 0
vowel = list("aeiouAEIOU")
for alphabet in str:
if alphabet in vowel:
count += 1
return count
str = "The Quick Brown Fox Jumps Over The Lazy Dog"
print("No. of vowels in given String is: ",vowel_count(str))
#BMI Calculater
def BMI_calculater(weight, height):
return weight/(height/100)**2 # BMI = weight(kg) /
Hight(m)^2
def BMI_scale(weight, height):
index = BMI_calculater(weight, height)
if index < 18.5:
print("The person is UNDER WEIGHT")
elif index < 24.9:
print("The person is HEALTHY")
elif index < 30:
print("The person is OVER WEIGHT")
else:
print("The person is OBESITY")
weight = float(input("Enter your Weight(KG): "))
height = float(input("Enter your Height(Cm): "))
BMI_scale(weight, height)