---
# System prepended metadata

title: 10/6 python homework

---

# 10/6 python homework
## 整數四則運算
```=python
integer1 = int(input("Please enter an integer1:"))
integer2 = int(input("Please enter an integer2:"))

print(f'integer1 + integer2 = {integer1+integer2}')
print(f'integer1 - integer2 = {integer1-integer2}')
print(f'integer1 * integer2 = {integer1*integer2}')
print(f'integer1 / integer2 = {round(integer1/integer2,2)}')
```
![](https://i.imgur.com/ple5g86.png)

## BMI(170cm/70kg) 加入四捨五入
```=python
#輸入你的體重(公斤)
weight = float(input(" Please type your weight (kg): "))     

#輸入你的身高(公分)
height = float(input(" Please type your height (cm): "))      

#取得BMI
BMI = weight / (height/100)**2                                     

#輸出你的BMI並四捨五入
print(f'Your BMI is {round(BMI,2)}')  
```
![](https://i.imgur.com/6Id1XBJ.png)



