Skip to content

Solve the Python Questions #6

@codewithdhruba01

Description

@codewithdhruba01

Issue Description:

We need to write a Python program that takes a sentence as input and returns the longest word in that sentence. This program will help beginners understand string manipulation and basic logic building in Python.

Example:
Input: "Random sentences can also spur creativity"
Output: "creativity"

Requirements:

  • Use basic Python (no external libraries)
  • Take input from the user
  • Handle punctuation (optional)
  • If two words have the same length, return the first one

How to Work on This Issue:

  1. Fork the repository and clone it to your local machine.
  2. Create a new branch, for example: longest-word-feature.
  3. Add a new Python file named longest_word.py.
  4. Write a function to solve the problem.
  5. Add a few test cases (in comments or as part of the code).
  6. Commit your changes with a meaningful message.
  7. Push the branch and create a Pull Request linking to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions