Answered step by step
Verified Expert Solution
Question
1 Approved Answer
it is python 3 class. please show me the screen shot of the code and paste the code. Thank you Problem A: Two sums (10
it is python 3 class. please show me the screen shot of the code and paste the code. Thank you
Problem A: Two sums (10 points) Write a function two_sums (aList, target) that takes in a list of integers aList and an integer target. The task is to find and return a tuple containing the two numbers in the list that sum up to the target number. See the example below Sample run of the program: two_ sums ([1,3,2,6,91,4) >>two sums ([3,5,2,6,9,1],5) (3, 2) Constraints and comments: . You may assume that there is exactly one pair of numbers that sum up to the target . You may not assume that the integers in aList are unique Note that aList does not have a fixed size. Your program should be able to handle lists of any size Your program should work for both positive and negative integers If a non-integer list or non-integer target is input, print a message with the error and do not attempt to find the two numbersStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started