AOS Python自学营007不写就出局无戒学堂:365天极限挑战日更营

解决莫名其妙的问题bug的方法

2019-04-13  本文已影响21人  AOS加贝

就是一开始就别让问题存在

我是一名c++、Java连续挂科的python初学者,25天的python自学,一直对“莫名其妙的bug”而苦恼。一是我有时候解决不了它,二是对我的编程学习没有多大帮助却耗费了我大量注意力。
那怎么才能一开始就让问题不存在呢?

#怎么才能一开始就让问题不存在
import time
print('Remember the wrong points, for example, you must use the English symbol')
errorvalue=input('please input errorvalue:worth or worthless:')
if errorvalue=="worth":
    print('Specify the time for research ')
    researchtime=int(input('please input the time you will spent(mins)'))
    time.sleep(researchtime*60)
    print('time is up! let\'s continue to learn python')
else:
    print('this is a worthless problem,let\'s continue to learn python')
上一篇 下一篇

猜你喜欢

热点阅读