Join the conversation

person_a_name = input("Enter person A name: ")
person_a_age = int(input("Enter person A age: ")) # convert to int
person_b_name = input("Enter person B name: ")
person_b_age = int(input("Enter person B age: ")) # convert to intif person_a_age > person_b_age:
print(f"{person_a_name} is elder than {person_b_name}")
elif person_a_age < person_b_age:
print(f"{person_b_name} is elder than {person_a_name}")
else:
print(f"{person_a_name} and {person_b_name} are of the same age")
Reply

# program to take weight and height from user and calculate BMI
weight = float(input("Enter your weight in kg: "))
height = float(input("Enter your height in meters: "))
bmi = weight / (height ** 2)
print("Your BMI is: " + str(bmi))
Reply

Learning
Reply

name1 = input('What is your name1? ')
name1_weight_in_kg = float(input('How much weight in kg? '))
name1_height_in_meter = float(input('How much height in meter? '))
def calculate_bmi(name1_weight_in_kg, name1_height_in_meter):
bmi = name1_weight_in_kg / (name1_height_in_meter ** 2)
return bmi
# Call the function to calculate BMI
bmi = calculate_bmi(name1_weight_in_kg, name1_height_in_meter)# Print the result
print(f"{name1}'s BMI: {bmi:.2f}")
Reply

# For BMI
name1 = input('What is your name1? ')
name1_weight_in_kg = float(input('How much weight in kg? '))
name1_height_in_meter = float(input('How much height in meter? '))
def calculate_bmi(name1_weight_in_kg, name1_height_in_meter):
bmi = name1_weight_in_kg / (name1_height_in_meter ** 2)
return bmi
# Call the function to calculate BMI
bmi = calculate_bmi(name1_weight_in_kg, name1_height_in_meter)# Print the result
print(f"{name1}'s BMI: {bmi:.2f}")
Reply

PROGRAM:
a=int(input("Enter Your Age:"))
b= float(input("Enter Your Weight:"))
c= float(input("Enter Your Height:"))
BMI=b/(c ** 2)
print("Your BMI is:",BMI)
Reply

sir aap itna achha tareqa se parhata hai hame samage aa rahi hai
Reply

ibrahim
Reply

person_1 = input("Please enter the name of Person 1: ")
person_2 = input("Please enter the name of Person 2: ")age_1 = input(f"Please enter {person_1}'s age: ")
age_2 = input(f"Please enter {person_2}'s age: ")if age_1>age_2:
print(person_1,"is older than ",person_2)
else:
print(person_2,"is older than ",person_1)
Reply

name = input("what is your name?:")
weight = float(input("what is your weight?:"))
height = float(input("what is your height?:"))bmi = weight / (height ** 2)if bmi < 18.5:
print("Underweight")
elif 18.5<=bmi <= 24.9:
print("normal")
elif 25 <= bmi <= 29.9:
print("Overweight")
else:
print("obese")
Reply