Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 1.47 KB

File metadata and controls

27 lines (18 loc) · 1.47 KB

Things you need to do automatically in order to troubleshoot first-level errors in your programs

indentation: Does the indentation follow the logic of the program? i.e if-else statements need to be on the same indentation level

syntax: Are there syntax errors? i.e when you call functions or add methods in your code add the () such as text.lower() i.e don't forget the parentheses or the colon at the end of a function such as
def my_function(): #insert the body of the function

run-time: Does your program run well but output a different result that the expected result? i.e you want to calculate the square root of a number but accidentally you calculate the cube

logical: Is there a logical error such as the program looks syntactically correct but does not make sense logically? i.e you assign 2 lives to a character in your game and your character still plays with 3 lives or plays with negatives numers as his lives

module imports. Did you import the proper module to have Python calculate special operations? i.e have Python calculate the square root of a number without importing the math module i.e for the above problem you can import just part of the module (from module import function, from math import sqrt) that is needed in your program ( or from math import*)

no space names. Did you leave a space in the name of a file or a function inside your program? i.e name a two-words function my_function and not my function

programs, demos for class