Advertisements
Advertisements
Question
Predict the output of the Python code given below:
def Diff(N1,N2):
if N1>N2:
return N1-N2
else:
return N2-N1
NUM= [10,23,14,54,32]
for CNT in range (4,0,-1):
A=NUM[CNT]
B=NUM[CNT-1]
print(Diff(A,B),'#', end=' ')One Line Answer
Advertisements
Solution
22 # 40 # 9 # 13 #
shaalaa.com
Handling Exceptions in Python
Is there an error in this question or solution?
