diff --git a/app/main.py b/app/main.py index 1b70596b..e76fa0a3 100644 --- a/app/main.py +++ b/app/main.py @@ -1,6 +1,12 @@ -def main(): - # write your code here - pass +def main() -> None: + file_name = input("Enter name of the file: ") + full_file_name = file_name + ".txt" + with open(full_file_name, "w") as file: + while True: + words = input("Enter new line of content: ") + if words == "stop": + break + file.write(words + "\n") if __name__ == "__main__":