Question: Given the following program has one error. Write down which line gives the error? 1 . def X ( n 1 , n 2 )

Given the following program has one error. Write down which line gives the error?
1. def X(n1, n2):
2. if n1< n2:
3. result = n1
4. else:
5. result = n2
6.
7. return result
8.
9. def main():
10. k = X()
11. print(k)
12.
13. main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!