Question: , * * Instructions: * * , 1 . Complete the tasks below by editing / adding the code in
Instructions:
Complete the tasks below by editingadding the code in the code cells directly below each question.
Submit your completed ipynb file on the module website under the appropriate link.
"For any queries about this assignment, email Katherine Malan at malankm@unisa.acza
"celltype": "markdown",
id: aeaf
"metadata":
"source":
## Question : debugging marks
"The following code is supposed to print out the Fibonacci sequence up to the number of terms specified by the user.
"For example, if the user enters the output should be:
"Fibonacci sequence of terms:
"However, the program contains a number of errors. Your task is to fix the code until it works correctly.
"For each error that you find in the program, add a comment to explain the error."
"celltype": "code",
"executioncount": null,
id: eac
"metadata":
"outputs":
"source":
"numterms inputEnter the number of terms:
t
t
"counter # counter for checking when to stop
if numterms
printNo terms number is not positive
"else:
while counter numterms:
printFibonacci sequence of numterms, terms:
if counter numterms : # the last term
printt
else:
printt end
nextterm t t
# update values
t t
t nextterm"
"celltype": "markdown",
id: b
"metadata":
"source":
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
