这段最后run出现的问题是为什么?

length = 16.7
width = 12.5
Perimeter= 2 * length + 2 * width
Are = length * width
print 'length = ', length, ' Width = ', width
print "Area = ", Area
阅读 2.7k
1 个回答

注意别手贱,看看你写的是什么Are = length * width.....

Length = 16.7
Width = 12.5
Perimeter = 2 * Length + 2 * Width
Area = Length * Width
print("""
    Length = %.1f, Width = %.1f
    Area = %.1f
""" % (Length, Width, Area))
推荐问题
logo
101 新手上路
子站问答
访问
宣传栏