Given an array of integers, write a program to find if a specific target sum can be achieved using two elements.
Implement def has_pair_with_sum(nums, target):. Return True if two distinct elements sum to target; otherwise return False. Each array element may be used at most once.
nums is a list of integers and target is an integer. Return a Boolean.
def has_pair_with_sum(nums, target):