Skip to main content

calc-facil

Uma calculadora simples com operações básicas (soma, subtração, multiplicação, divisão).

Este projeto foi criado como parte de um treinamento sobre como criar e publicar pacotes Python no PyPI.

Instalação

pip install calc-facil

Uso

from calc_facil import Calculadora

# Criar uma instância da calculadora
calc = Calculadora()

# Realizar operações
soma = calc.soma(5, 3) # 8
diferenca = calc.subtracao(5, 3) # 2
produto = calc.multiplicacao(5, 3) # 15
quociente = calc.divisao(6, 3) # 2.0

# Tratamento de erros
try:
    resultado = calc.divisao(5, 0)
except ZeroDivisionError as e:
    print(f'Erro: {e}')

Uso via linha de comando (CLI)

Após a instalação, é possível utilizar o comando calc-facil diretamente no terminal:

calc-facil <operacao> <a> <b>

Exemplos:

calc-facil soma 2 3
# Resultado: 5.0

calc-facil divisao 10 2
# Resultado: 5.0

As operações disponíveis são:

  • soma
  • subtracao
  • multiplicacao
  • divisao

Operações disponíveis

  • soma(a, b): Retorna a soma de a e b
  • subtracao(a, b): Retorna a diferença entre a e b
  • multiplicacao(a, b): Retorna o produto de a e b
  • divisao(a, b): Retorna o quociente da divisão de a por b (lança ZeroDivisionError se b for zero)

Pré-requisitos

  • Python 3.6 ou superior

Licença

Este projeto está licenciado sob a Licença MIT. Veja o arquivo LICENSE para mais detalhes.

Metadata

Release files for calc-facil 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for calc-facil 1.0.0
File Size Uploaded Provenance Actions
calc_facil-1.0.0.tar.gz 4.1 kB Without provenance Details for calc_facil-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for calc-facil 1.0.0
File Interpreter ABI Platform Actions
calc_facil-1.0.0-py3-none-any.whl Python 3 none any Details for calc_facil-1.0.0-py3-none-any.whl

Total release size: 9.2 kB

Release files / calc_facil-1.0.0.tar.gz

Download URL calc_facil-1.0.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
76794102d798c239823b75c87f6f56dadaf9ef6f2e2cddcce5d2f85a13c020b9
BLAKE2b-256 checksum
How to use checksums
11b0b9801ee1325f58650db36fb67c63039489c3b7b3efaa24c793e68c58bbc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.6

Release files / calc_facil-1.0.0-py3-none-any.whl

Download URL calc_facil-1.0.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
325104b9dbcb47c2fcf55241711b65e735c7a5e53f588ccb4dab9b49f750776a
BLAKE2b-256 checksum
How to use checksums
2eb91019601ab93db785506d444dacfdb6b14e907d683bafc96c1ae9044d8e9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.6

Security for calc-facil 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page