# 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:  ## 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: 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up