Skip to content

omkar7176/Word-Counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Word-Counter

Overview

The Word Counter project is a Python-based program that counts the number of words in a given sentence or paragraph. This project was developed as part of a Python programming internship to strengthen understanding and application of core Python concepts such as input handling, string manipulation, function creation, and error handling.

Features

1. User Input: The program prompts the user to enter a sentence or paragraph.
2. Word Count Logic: A function is implemented to count the number of words in the user input.
3. Error Handling: Accounts for empty inputs and displays an appropriate message.
4. User-Friendly Interface: Provides clear and concise prompts for input and output display.
5. Code Comments: The code is fully documented with comments explaining key parts of the logic.

Project Objectives

  • Learn how to handle user input in Python.
  • Explore string manipulation techniques to efficiently process text.
  • Practice function creation for modular programming.
  • Implement basic control flow for structured logic.
  • Provide a clear output displaying the word count.

Requirements

  • Python 3.x

How to Run the Project

1. Clone the repository: git clone https://github.com/yourusername/word-counter.git

2. Navigate to the project directory: cd word-counter

3. Run the Python script: python word_counter.py

Usage

  1. The program will prompt you to enter a sentence or paragraph.
  2. After inputting the text, press Enter.
  3. The program will output the total number of words in the text.

Example

Enter a sentence or paragraph:
This is a test sentence.

Output:
Word Count: 5

Contributing

If you'd like to contribute, feel free to fork the repository and submit a pull request. Any suggestions or improvements are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages