Question: Consider the following functions:Function 1 :def add _ version 1 ( n 1 , n 2 ) :sum = n 1 + n 2 return

Consider the following functions:Function 1:def add_version1(n1, n2):sum = n1+ n2return sumFunction 2:def add_version2(n1, n2):sum = na + n2print (sum)a. What will be the output in the following programs?n1=10n2=20n3= add_version1(n1, n2)print (n3)Output: 303:194 Chromen4=30n5=50n6= add_version2(n4, n5)print (n6)Output: 80Noneb. Explain the difference between add_version1 and add_version2.

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!