Skip to main content

Python implementation of the game of marco polo.

Project description

Marco Polo

A Python implementation of the classic game of Marco Polo.

Description

This library provides a simple Python function that implements the Marco Polo game logic. When you call "Marco", it responds with "Polo"!

Installation

Install the package using pip:

pip install juancobo6-marco-polo

Or if you're using uv:

uv add juancobo6-marco-polo

Requirements

  • Python 3.12 or higher
  • pandas >= 2.3.1

Usage

from juancobo6_marco_polo import marco_polo

# Basic usage
result = marco_polo("Marco")
print(result)  # Output: "Polo"

# Other inputs return None
result = marco_polo("Hello")
print(result)  # Output: None

API Reference

marco_polo(name: str) -> str | None

Returns "Polo" if the name is "Marco", otherwise returns None.

Parameters:

  • name (str): The name to check

Returns:

  • str | None: "Polo" if the name is "Marco", otherwise None

Example:

from marco_polo import marco_polo

assert marco_polo("Marco") == "Polo"
assert marco_polo("Polo") is None
assert marco_polo("John") is None

Development

This project uses:

  • Build system: Hatchling
  • Dependencies: pandas
  • Type hints: Fully typed with py.typed marker

License

This project is open source. See the license file for details.

Author

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

juancobo6_marco_polo-0.2.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

juancobo6_marco_polo-0.2.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file juancobo6_marco_polo-0.2.1.tar.gz.

File metadata

File hashes

Hashes for juancobo6_marco_polo-0.2.1.tar.gz
Algorithm Hash digest
SHA256 cee786a2bcf802112cd7c7219850a4b6f068fe923a8e35d7041aa7a79fd45275
MD5 60dcc4594edcead79f75e6d6d0bfdf82
BLAKE2b-256 f14469f7ad7e81e9363103991c6bf4158ca18512f3097a80af9a29f0b7e9ac34

See more details on using hashes here.

File details

Details for the file juancobo6_marco_polo-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for juancobo6_marco_polo-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12a8ac4e3f9a6192e5f1b7279aacc757399a140ea22426c914e562d1755ce7f4
MD5 521b217b82ee5781dbace72aaa3bf8e3
BLAKE2b-256 4d836c311edd897b420cdac4c32b5a33ed11b115264e799a89d887aa2aebecc9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page