拼写
拼写变量、自定义函数错误
如start_point拼写成start-point或缺少、增加字母等。
拼写关键字错误
如print缺少字母变成prin、除号拼写成了/
拼写库函数错误
如pop拼写成poop。
赋值与相等符号混用
缩进
有了错误的缩进:
print_irst_and_last(sentence)
print_first_a_last_sorted(senence)
导入相关
如果已经import ex25则每次执行里面的函数都要ex25.printfirst()
如果已经from ex25 import *,则每次执行函数都不能加ex25:printfirst()``
.








网友评论