gym-cas


Namegym-cas JSON
Version 0.4.6 PyPI version JSON
download
home_pageNone
SummaryCAS tools for danish high schools.
upload_time2024-09-10 16:38:58
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords cas matematik math gymnasium htx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GYM CAS

[![PyPI - Version](https://img.shields.io/pypi/v/gym-cas.svg)](https://pypi.org/project/gym-cas)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gym-cas.svg)](https://pypi.org/project/gym-cas)
![Coverage](../../downloads/coverage.svg)

Anvend Python som CAS (Computational Algebra System) i gymnasiet.
Bygger på følgende moduler:

- Algebra/beregninger:
    - [SymPy](https://docs.sympy.org/latest/index.html)
    - [NumPy](https://numpy.org/)
- Afbildninger:
    - [SymPy Plot Backends](https://sympy-plot-backends.readthedocs.io/en/latest/modules/index.html)
    - [Matplotlib](https://matplotlib.org/)

## Installation

```console
pip install gym-cas
```

eller

```console
py -m pip install gym-cas
```

## Cheatsheet

I nedenstående afsnit antages det at `gym_cas` først importeres således:

```py
from gym_cas import *
```

### B1. Tal- og bogstavregning

```py
expand( udtryk )
factor( udtryk )
```

### B2. Ligninger og uligheder

```py
solve( udtryk )
solve( [udtryk1, udtryk2] )
nsolve( udtryk, start )
```

Bemærk at den nemmeste måde at bruge `solve` i `SymPy` er ved at omforme sin ligning så en af siderne er lig 0. Hvis man fx vil løse ligningen `x/2 = 10` så kan det skrives `solve(x/2-10)`.

### B3. Geometri og trigonometri

```py
Sin( vinkel )
Cos( vinkel )
Tan( vinkel )
aSin( forhold )
aCos( forhold )
aTan( forhold )
```

### B4. Analytisk plangeometri

```py
plot_list( X_list ,Y_list, is_point=True)
plot( funktion )
plot_implicit( udtryk ,xlim=( x_min, x_max),ylim=( y_min, y_max))
plot_geometry( Geometrisk objekt )
```

#### Flere grafer i en afbildning

```py
p1 = plot( udtryk1 )
p2 = plot( udtryk2 )
p = p1 + p2
p.show()
```

### B5. Vektorer

```py
a = vector(x,y)
a.dot(b)
plot_vector( vektor )
plot_vector( start, vektor )
plot_vector( [vektor1, vektor2, ...])
```

### B6. Deskriptiv Statistik

#### Ugrupperet

```py
max( data )
min( data )
mean( data )
median( data )
var( data, ddof )
std( data, ddof ) 
kvartiler( data )
percentile( data , procenter )
frekvenstabel( data )
boxplot( data ) 
plot_sum( data )
```

#### Grupperet

```py
group_mean( data, grupper )
group_percentile( data, grupper, procenter )
group_var( data, grupper, ddof )
group_std( data, grupper, ddof ) 
frekvenstabel( data, grupper )
boxplot( data, grupper ) 
plot_sum( data, grupper )
plot_hist( data, grupper )
```

### B8. Funktioner

```py
def f(x):
    return funktionsudtryk
f(3)

def f(x):
    return Piecewise(( funktion1, betingelse1), (funktion2, betingelse2))

plot( funktion , yscale="log")
plot( funktion , (variabel, start, stop), xscale="log", yscale="log")
regression_poly(X,Y, grad)
regression_power(X,Y)
regression_exp(X,Y)
```

### B9. Differentialregning

```py
limit( udtryk, variabel, grænse, retning )
diff( funktion )
def df(xi):
    return diff( funktion ).subs( variabel, xi )
```

### B10. Integralregning

```py
integrate( udtryk )
integrate( udtryk, ( variabel, start, slut ))
```

### A1. Vektorer i rummet

```py
a = vector(1,2,3)
a.cross(b)
plot3d_list( X, Y, is_point=True)
plot_vector( a )
plot3d_line( a + t * r )
plot3d_plane( a + s * r1 + t * r2 )
plot3d_implicit( ligning, backend=PB ) # Kræver Plotly eller K3D
```

### A4. Differentialligninger

```py
f = Function('f')
dsolve( ode )
plot_ode( ode, (x, start, stop), (f, start, stop))
```

### A5. Diskret Matematik

```py
X = [ udregning for x in range(start,slut)]
X = [ startbetingelse ]
for i in range(start, slut):
    X.append( rekursionsligning )
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gym-cas",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "CAS, Matematik, Math, Gymnasium, HTX",
    "author": null,
    "author_email": "JACS <jacs@zbc.dk>",
    "download_url": "https://files.pythonhosted.org/packages/a4/6c/cf21fe9d1ab5188dc00e998874092087522fccd115e3e6cf152e82822b91/gym_cas-0.4.6.tar.gz",
    "platform": null,
    "description": "# GYM CAS\n\n[![PyPI - Version](https://img.shields.io/pypi/v/gym-cas.svg)](https://pypi.org/project/gym-cas)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gym-cas.svg)](https://pypi.org/project/gym-cas)\n![Coverage](../../downloads/coverage.svg)\n\nAnvend Python som CAS (Computational Algebra System) i gymnasiet.\nBygger p\u00e5 f\u00f8lgende moduler:\n\n- Algebra/beregninger:\n    - [SymPy](https://docs.sympy.org/latest/index.html)\n    - [NumPy](https://numpy.org/)\n- Afbildninger:\n    - [SymPy Plot Backends](https://sympy-plot-backends.readthedocs.io/en/latest/modules/index.html)\n    - [Matplotlib](https://matplotlib.org/)\n\n## Installation\n\n```console\npip install gym-cas\n```\n\neller\n\n```console\npy -m pip install gym-cas\n```\n\n## Cheatsheet\n\nI nedenst\u00e5ende afsnit antages det at `gym_cas` f\u00f8rst importeres s\u00e5ledes:\n\n```py\nfrom gym_cas import *\n```\n\n### B1. Tal- og bogstavregning\n\n```py\nexpand( udtryk )\nfactor( udtryk )\n```\n\n### B2. Ligninger og uligheder\n\n```py\nsolve( udtryk )\nsolve( [udtryk1, udtryk2] )\nnsolve( udtryk, start )\n```\n\nBem\u00e6rk at den nemmeste m\u00e5de at bruge `solve` i `SymPy` er ved at omforme sin ligning s\u00e5 en af siderne er lig 0. Hvis man fx vil l\u00f8se ligningen `x/2 = 10` s\u00e5 kan det skrives `solve(x/2-10)`.\n\n### B3. Geometri og trigonometri\n\n```py\nSin( vinkel )\nCos( vinkel )\nTan( vinkel )\naSin( forhold )\naCos( forhold )\naTan( forhold )\n```\n\n### B4. Analytisk plangeometri\n\n```py\nplot_list( X_list ,Y_list, is_point=True)\nplot( funktion )\nplot_implicit( udtryk ,xlim=( x_min, x_max),ylim=( y_min, y_max))\nplot_geometry( Geometrisk objekt )\n```\n\n#### Flere grafer i en afbildning\n\n```py\np1 = plot( udtryk1 )\np2 = plot( udtryk2 )\np = p1 + p2\np.show()\n```\n\n### B5. Vektorer\n\n```py\na = vector(x,y)\na.dot(b)\nplot_vector( vektor )\nplot_vector( start, vektor )\nplot_vector( [vektor1, vektor2, ...])\n```\n\n### B6. Deskriptiv Statistik\n\n#### Ugrupperet\n\n```py\nmax( data )\nmin( data )\nmean( data )\nmedian( data )\nvar( data, ddof )\nstd( data, ddof ) \nkvartiler( data )\npercentile( data , procenter )\nfrekvenstabel( data )\nboxplot( data ) \nplot_sum( data )\n```\n\n#### Grupperet\n\n```py\ngroup_mean( data, grupper )\ngroup_percentile( data, grupper, procenter )\ngroup_var( data, grupper, ddof )\ngroup_std( data, grupper, ddof ) \nfrekvenstabel( data, grupper )\nboxplot( data, grupper ) \nplot_sum( data, grupper )\nplot_hist( data, grupper )\n```\n\n### B8. Funktioner\n\n```py\ndef f(x):\n    return funktionsudtryk\nf(3)\n\ndef f(x):\n    return Piecewise(( funktion1, betingelse1), (funktion2, betingelse2))\n\nplot( funktion , yscale=\"log\")\nplot( funktion , (variabel, start, stop), xscale=\"log\", yscale=\"log\")\nregression_poly(X,Y, grad)\nregression_power(X,Y)\nregression_exp(X,Y)\n```\n\n### B9. Differentialregning\n\n```py\nlimit( udtryk, variabel, gr\u00e6nse, retning )\ndiff( funktion )\ndef df(xi):\n    return diff( funktion ).subs( variabel, xi )\n```\n\n### B10. Integralregning\n\n```py\nintegrate( udtryk )\nintegrate( udtryk, ( variabel, start, slut ))\n```\n\n### A1. Vektorer i rummet\n\n```py\na = vector(1,2,3)\na.cross(b)\nplot3d_list( X, Y, is_point=True)\nplot_vector( a )\nplot3d_line( a + t * r )\nplot3d_plane( a + s * r1 + t * r2 )\nplot3d_implicit( ligning, backend=PB ) # Kr\u00e6ver Plotly eller K3D\n```\n\n### A4. Differentialligninger\n\n```py\nf = Function('f')\ndsolve( ode )\nplot_ode( ode, (x, start, stop), (f, start, stop))\n```\n\n### A5. Diskret Matematik\n\n```py\nX = [ udregning for x in range(start,slut)]\nX = [ startbetingelse ]\nfor i in range(start, slut):\n    X.append( rekursionsligning )\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "CAS tools for danish high schools.",
    "version": "0.4.6",
    "project_urls": {
        "Homepage": "https://jacs-mat.bitbucket.io/"
    },
    "split_keywords": [
        "cas",
        " matematik",
        " math",
        " gymnasium",
        " htx"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5bbe24719578fa2515876597be991a17a6215862e94d3dee3c801c300e40a1af",
                "md5": "ba32ad3860e424a6417ab0b7c4a2c3e4",
                "sha256": "57380b8fd2a493e336a8fe0cfc04a5c9f736b84648109d4ff26fe378113b414f"
            },
            "downloads": -1,
            "filename": "gym_cas-0.4.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ba32ad3860e424a6417ab0b7c4a2c3e4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 20383,
            "upload_time": "2024-09-10T16:38:56",
            "upload_time_iso_8601": "2024-09-10T16:38:56.596979Z",
            "url": "https://files.pythonhosted.org/packages/5b/be/24719578fa2515876597be991a17a6215862e94d3dee3c801c300e40a1af/gym_cas-0.4.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a46ccf21fe9d1ab5188dc00e998874092087522fccd115e3e6cf152e82822b91",
                "md5": "f44770aebd1b66188b8e374e19d6aa0f",
                "sha256": "f38b28c683ce627779ca811e9b994205d11897c20380454eb5b6690da47f4d8d"
            },
            "downloads": -1,
            "filename": "gym_cas-0.4.6.tar.gz",
            "has_sig": false,
            "md5_digest": "f44770aebd1b66188b8e374e19d6aa0f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 30310,
            "upload_time": "2024-09-10T16:38:58",
            "upload_time_iso_8601": "2024-09-10T16:38:58.808267Z",
            "url": "https://files.pythonhosted.org/packages/a4/6c/cf21fe9d1ab5188dc00e998874092087522fccd115e3e6cf152e82822b91/gym_cas-0.4.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-10 16:38:58",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gym-cas"
}
        
Elapsed time: 0.43274s