Created
May 21, 2021 10:39
-
-
Save DonghyungKo/fa8f80178f56e57e02788c50fcfa45ad to your computer and use it in GitHub Desktop.
Test #1
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
import argparse | |
parser = argparse.ArgumentParser(description="Sum two non-negative integers") | |
parser.add_argument("a", type=int, help="first non-negative integer") | |
parser.add_argument("b", type=int, help="second non-negative integer") | |
args = parser.parse_args() | |
if __name__ == "__main__": | |
a:int = args.a | |
b:int = args.b | |
if (a < 0) or (b < 0): | |
parser.print_help() | |
exit(1) | |
sum:int = a + b | |
print(sum) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment