Learn with Yasir

Share Your Feedback

Mini Project: String Formatter Toolkit


Learn how to use the SUM function and AutoSum in Microsoft Excel to quickly add values across cells, columns, or rows. Includes syntax, examples, and tips for efficient usage.

Objective:

Create an interactive console-based tool that allows users to input strings and perform various string operations, such as reversing, formatting, replacing substrings, counting occurrences of characters, and more.

Features:

  1. Reverse a String
    Allow the user to input a string and reverse it.

  2. Convert to Uppercase and Lowercase
    Provide options to convert the string to either all uppercase or all lowercase.

  3. Count Vowels and Consonants
    Count and display the number of vowels and consonants in the input string.

  4. Replace a Substring
    Allow the user to replace a specific substring within the string with another substring.

  5. Format Title Case
    Convert the input string into title case (capitalize the first letter of each word).

  6. Remove Extra Spaces
    Remove any extra spaces from the input string, ensuring only single spaces between words.

  7. Check for Palindrome
    Check if the string is a palindrome, ignoring spaces, punctuation, and case sensitivity.

  8. Word Count
    Count and display the number of words in the input string.

How the Tool Works:

  1. User Input: The tool will prompt the user to enter a string of their choice.
  2. Select Operation: The user can select from the listed string operations by choosing the corresponding number.
  3. Display Result: The result of the selected operation will be displayed immediately, and the user can perform additional operations or exit the tool.
  4. Exit: The tool will continue to run until the user decides to exit.

Example Interaction:

Welcome to the String Manipulation Tool!
Choose an operation:
1. Reverse a string
2. Convert to uppercase
3. Convert to lowercase
4. Count vowels and consonants
5. Replace a substring
6. Format title case
7. Remove extra spaces
8. Check if the string is a palindrome
9. Count words in a string
10. Exit
Enter the number of your choice: 1
Enter a string: Hello, World!
Reversed string: !dlroW ,olleH

Explore More Topics

📘 Learn Python

Tutorials, Roadmaps, Bootcamps & Visualization Projects

Python Fundamentals

Flow Control Statements


Python Functions


Fundamentals more ...




🧠 Python Advanced

Object-Oriented Programming in Python (OOP)

More...

🧠 Modules