Skip to content

Files

Latest commit

 

History

History

Word Count Tool

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Word Count Tool

The Word Count Tool is a simple Python script that calculates the number of words in a given text input.

Description

This Python script provides a basic functionality to count the number of words in a text input:

  • count_words(text): Function that splits the input text into words and returns the count of words.
  • word_count_tool(): Function that takes user input and utilizes 'count_words' to print the word count.

Installation

  1. Clone the Repository:
            git clone https://github.com/yourusername/word-count-tool.git
            cd word-count-tool
  1. No Additional Modules Required: This script only uses Python's standard library, so no additional modules need to be installed.

How to Run the Script

After cloning the repository and navigating to the project directory:

          python word_count_tool.py

Follow the on-screen prompts to enter text and see the word count result.

Example Usage

$ python word_count_tool.py

Enter some text: Hello world, this is a sample text.
Word count: 7