Skip to content

MKaish/Word-counter-program-using-python-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Word Counter Program

Project Overview

The Word Counter program is a simple Python script designed to count the number of words in a given sentence or paragraph. This project helps reinforce Python programming concepts such as input handling, string manipulation, function creation, and basic error handling.

Features

  • User Input: Prompts the user to enter a sentence or paragraph.
  • Word Counting Logic: Splits the input text into words and counts them.
  • Error Handling: Handles cases where no input is provided.
  • User-Friendly Output: Clearly displays the word count in a readable format.

Requirements

  • Python 3.x

How to Run the Program

  1. Ensure you have Python installed on your system.
  2. Download or copy the word_counter.py script.
  3. Open a terminal or command prompt.
  4. Navigate to the directory containing the script.
  5. Run the script using the command:
    python word_counter.py
  6. Enter a sentence or paragraph when prompted.
  7. The program will display the word count.

Example Usage

Welcome to the Word Counter Program!
Enter a sentence or paragraph: Python programming is fun and educational.
Word Count: 6

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages