Answer :
The program which returns the sum of the duplicate and missing number is written in python 3 thus ;
def dup(nums):
#initialize a function which takes In a list of values as argument.
nums.sort()
#sort the values in ascending order
for i in range(1, len(nums)):
#iterate through the list
if nums[i] == nums[i-1]:
#Check for repeated values
return nums[i] + nums[i]-1
#return the sum of the repeated values - 1
nums = [4,3,3,1]
print(dup(nums))
A sample run of the program is attached.
Learn more : https://brainly.com/question/25574075
