Created
May 19, 2017 17:45
-
-
Save kevinpostal/f40561b74d3363c6f36471f2481d41f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
first_line = "3" | |
second_line = "1 2 4" | |
def main(first_line, second_line): | |
if int(first_line) != len(second_line.split()): | |
return False | |
else: | |
return sum((int(item) for item in second_line.split())) | |
if main(first_line="3", second_line="1 2 4") == 7: | |
print "Line Length Correct" | |
if not main(first_line="3", second_line="1 2 4 6 7"): | |
print "Incorrect Array Length" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment