Skip to content

Commit

Permalink
test code
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanlanders committed Feb 16, 2024
1 parent f455935 commit 8c62932
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TOO LONG
22 changes: 22 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Read in Markdown file
with open("test-markdown.md", encoding = 'utf-8') as f:
markdown_input = f.read()

# Verify if input was read correctly
print(markdown_input)

# Count how many words there are in input
words = markdown_input.split()
word_count = len(words)

# Count how many sentences there are in input
sentences = markdown_input.split('.')
sentence_count = len(sentences)

# Count how many paragraphs there are in input
paragraphs = markdown_input.split("\n")
paragraph_count = len(paragraphs)

if len(words)>100:
with open("output.txt", "w") as file1:
file1.write("TOO LONG")

0 comments on commit 8c62932

Please sign in to comment.