帮我把这个程序调试一下,我调了半天还是不行,大概问题知道,但是不知道怎么改

img


总之大概问题就是,因为缩进的写法,而且if-else语句块中没有处理错误的语句,谢谢

逻辑稍有问题

w = int(input("重量:"))
sfjj = input("是否加急Y/N, y/n")
if sfjj not in ["Y", "y", "N", "n"]:
    print("输入错误")
else:
    cost = 8
    if w > 1000:
        cost += math.ceil((w - 1000) / 500) * 4
    if sfjj in ["Y", "y"]:
        cost += 5
    print("cost", cost)