Merge branch 'main' of https://gogs.gtsplab.com:5432/SVIG/python-bootcamp
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
geckodriver.log
|
||||
.gitignore
|
||||
*.pyc
|
||||
*/__pycache__
|
||||
@@ -0,0 +1,28 @@
|
||||
import pdb
|
||||
|
||||
def calculate_average(numbers):
|
||||
total = sum(numbers)
|
||||
average = total / len(numbers)
|
||||
return average
|
||||
|
||||
def main():
|
||||
data = [1, 2, 3, 4, 5]
|
||||
|
||||
pdb.set_trace()
|
||||
result = calculate_average(data)
|
||||
print("The average is:", result)
|
||||
|
||||
pdb.set_trace() # Set a breakpoint at this line
|
||||
|
||||
print("Program execution resumed.")
|
||||
# ... continue with the rest of your code
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
# n or next: Execute the next line of code.
|
||||
# s or step: Step into a function call.
|
||||
# c or continue: Continue execution until the next breakpoint or the program's end.
|
||||
# p or print: Print the value of a variable.
|
||||
# q or quit: Quit the debugger and exit the program.
|
||||
Reference in New Issue
Block a user