diff --git a/app/hello.py b/app/hello.py new file mode 100644 index 0000000..e5d657f --- /dev/null +++ b/app/hello.py @@ -0,0 +1,13 @@ +def print_messages(prefix, count): + for i in range(1, count + 1): + suffix = "" if i == 1 else f" {i}" + try: + print(f"{prefix}{suffix}") + except IOError as e: + import sys + sys.stderr.write(f"Error writing to stdout: {e}\n") + break + +print_messages("Hello world", 3) + +print_messages("Test PR 2", 4) \ No newline at end of file