也可以使用自定义函数来判断输入是否为数字。 ... str = raw_input("please input the number:") try: f = float(str) exception ValueError: print("输入的不是数字!
確定! 回上一頁