思考解决问题的编程方法的常见步骤
遇到实际问题,我们如果想用编写程序来解决。我们的思考到编写方法通常可以归纳为以下简单的步骤。
步骤
0: 别慌张
1: 哪些是输入?
2: 要输出什么?
3: 手写一些例子
4:写简单的答案
5: 逐步开发,再测试
英文参考 Pythonista Guide to all problems in the Galaxy
0: Don’t be panic
1: What are the inputs?
2: What are the outputs?
3: Work through some examples by hand
4: simple mechanical solution
5: Develop incrementally and tests as we go