fork download
  1. # your code goes here
Success #stdin #stdout 0.1s 14152KB
stdin
# Simple Word Counter

# Get input from the user
text = input("Enter a sentence: ")

# Split the sentence into words
words = text.split()

# Count the words
word_count = len(words)

# Display the result
print("Word count:", word_count)
stdout
Standard output is empty