# 1006 Homework 410923021 左其右 修改 ## BMI calculator code: ```python # BMI calculator # User input weight = float(input("Weight (kg): ")) height = float(input("Height (m) : ")) # BMI formula bmi = weight / (height * height) # Result print(f"x / y: {bmi:.{2}f}") ``` result: ![](https://i.imgur.com/pYBY1O2.png) ## Integer operation code: ```python # Integer operation # User input x = int(input("Input the first integer : ")) y = int(input("Input the second integer: ")) # Perform the basic operations # and print out the result using f-string formating print(f"x + y: {x+y}") print(f"x - y: {x-y}") print(f"x * y: {x*y}") print(f"x / y: {x/y:.{2}f}") ``` result: ![](https://i.imgur.com/yoD0Rwe.png)