x=float(input('请输入用水量:')
if x<=100:
print('您的水费是',x*0.6,'元')
elif x>100 and x<=200:
print('您的水费是',x*0.7,'元')
else:
print('您的水费是',x*0.9,'元') *
from microbit import *
while True:
water_ level =pinl. read_ analog () #将p1引脚的模拟值设为变量“water_ level”
if water_ level<300:
display. show (Image. SAD)
else:
display. show (Image. HAPPY)
a=int(input("请输入买苹果的斤数:")
if :
s=10*a
else:
s=8*a
print("苹果费用:"+str(s))