Write a program which allows the user to enter a list of numbers.Write a program which allows the user to enter a list of numbers,then works out whether there are any two numbers in the list which sum to 100.Hint:you could loop through the numbers in the list,and for each number,loop through the list again looking for a number that adds to it to make 100.However,there are other ways to do this too.

问题描述:

Write a program which allows the user to enter a list of numbers.
Write a program which allows the user to enter a list of numbers,then works out whether there are any two numbers in the list which sum to 100.Hint:you could loop through the numbers in the list,and for each number,loop through the list again looking for a number that adds to it to make 100.However,there are other ways to do this too.

def checkio(data, target):data.sort()i = 0j = len(data)-1while(i < j):if data[i] + data[j] > target:j -= 1elif d...