Packages just for learning purposes related to a calculator
Project description
Math Operations Script
This script provides basic arithmetic functions for addition, subtraction, multiplication, and division.
Implementation
#!/usr/bin/env python3
def sum(x, y):
"""Returns the sum of x and y."""
return x + y
def res(x, y):
"""Returns the difference of x and y."""
return x - y
def mult(x, y):
"""Returns the product of x and y."""
return x * y
def div(x, y):
"""
Returns the division of x by y.
Returns None if y is 0 to avoid ZeroDivisionError.
"""
if y != 0:
return x / y
else:
return None
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file horusso_calculator-0.1.0.tar.gz.
File metadata
- Download URL: horusso_calculator-0.1.0.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b13ce92b964db23f685e85938dc4b81b197e78f854648bc2f32bd697732046e
|
|
| MD5 |
f26015b29728a1a1e5133a233380a459
|
|
| BLAKE2b-256 |
e6d3f2a78c8f404c9ab3b0c6f8948befad5f5d0ac79bf9289cef7fda2199d9ad
|
File details
Details for the file horusso_calculator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: horusso_calculator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b5b1f3bbe51f68c6cc7d514fde489e90bb8e76def83e88d4e0e26f681c1af24
|
|
| MD5 |
d453a0953ad851865ce065597a21f1e8
|
|
| BLAKE2b-256 |
338b8fdbd997e46429511caa18b6a743d5ba04b26c41f9313018ac643d9b91ae
|