【发布时间】:2016-03-01 04:20:10
【问题描述】:
我得到的主要错误是;
TypeError: /: 'str' 和 'int' 的操作数类型不受支持
#Name variables/imports. Ask usr for scale lengh and num of frets
import math
scalelenth = input ("please inter a number for scale \n > " )
constnum = 17.817
#Calculate Fret one distance
fretum = scalelenth / constnum
print("this is scale lenth %d " %scalelenth)
【问题讨论】:
-
我点击了代码按钮,但它不起作用。如何编辑以尝试找出我做错了什么?没有编辑按钮吗?
-
我认为你需要这样做:
float(input(....)) -
谢谢您的快速回复。现在可以了。