How to code this in Python

Sum Numbers

Programming challenge description:

Write a program that, given a list of three numbers, determines if it is possible to add two of the numbers to arrive at the third.

Input:

Your program should read lines from standard input. Each line contains a comma separated list of three integers.

Output:

For each line from standard input, print ‘true’ or ‘false’ to standard output if any of the two input numbers can be added to arrive at the third, one per line.

Test 1 Input

1,2,3

Test 1 Output

true

Test 2 Input

3,1,2

Test 2 Output

true

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.