Skip to content

Commit dc3e5b8

Browse files
authored
Updated indentation of the python code
1 parent 5acac62 commit dc3e5b8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

contrib/mini-projects/wordcounter.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The provided code defines a Python function count_words(sentence) aimed at count
3030
It then calls the count_words function, passing the user's input as an argument, and stores the returned word count in the variable number_of_words.
3131
Finally, it prints out the number of words in the sentence.
3232

33-
def count_words(sentence):
33+
def count_words(sentence):
3434
# Split the sentence into words
3535
words = sentence.split()
3636

@@ -39,8 +39,8 @@ The provided code defines a Python function count_words(sentence) aimed at count
3939

4040
return word_count
4141

42-
# Example usage:
43-
sentence = input("Enter a sentence: ")
44-
number_of_words = count_words(sentence)
45-
print("Number of words:", number_of_words)
42+
# Example usage:
43+
sentence = input("Enter a sentence: ")
44+
number_of_words = count_words(sentence)
45+
print("Number of words:", number_of_words)
4646

0 commit comments

Comments
 (0)