求大神。。。
Topic sourceFrequency is a string for example, if you input 10, then Frequency = '10' so Period = 1 / '10'. that is wrong. you should convert Frequency into int. like this 1/int(Frequency).
- 1
Frequency is a string for example, if you input 10, then Frequency = '10' so Period = 1 / '10'. that is wrong. you should convert Frequency into int. like this 1/int(Frequency).
用户5600008129
不知道怎么办了。。。 Frequency = input('Frequency =') print('Period =', 1/Frequency)
一运行就TypeError: unsupported type(s) for /: 'int' and 'str'