✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
How many times will the marked line in the following code run when the input integer is n?
def mystery(n):
stamp = 0
if n <= 0:
return 0
else:
for i in range(n):
for j in range(n):
stamp += j # This line
return stamp
Answer in terms of n
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!