Skip to main content

CAS tools for danish high schools.

Project description

GYM CAS

PyPI - Version PyPI - Python Version Coverage

Hjælpepakke til at bruge Python som CAS (Computational Algebra System) i gymnasiet.

Installation

pip install gym-cas

eller

py -m pip install gym-cas

Cheatsheet

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

from gym_cas import *

B1. Tal- og bogstavregning

expand( udtryk )
factor( udtryk )

B2. Ligninger og uligheder

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

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

B4. Analytisk plangeometri

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

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

B5. Vektorer

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

B6. Deskriptiv Statistik

Ugrupperet

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

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

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

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

B10. Integralregning

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

A1. Vektorer i rummet

a = Matrix([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

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

A5. Diskret Matematik

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

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

gym_cas-0.3.2.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

gym_cas-0.3.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file gym_cas-0.3.2.tar.gz.

File metadata

  • Download URL: gym_cas-0.3.2.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.2

File hashes

Hashes for gym_cas-0.3.2.tar.gz
Algorithm Hash digest
SHA256 2d453993e3bcc57717bc8f931b75ed7dd857a7679a4722ba348522b53d24c107
MD5 be4e042da14e0001c5cb307856768c2f
BLAKE2b-256 9dcf645d6b6ac3651287f9e0f5e7c7c43a60d56cfd7eda40fd364f4d205c0d24

See more details on using hashes here.

File details

Details for the file gym_cas-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: gym_cas-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.2

File hashes

Hashes for gym_cas-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8830943593b556e63a2a6c956ea06b985ddb85f26f2d96636f07ff8816545ced
MD5 7bf9f00d8d7f30f10f5bb1819c84fae8
BLAKE2b-256 c6e6999f4f532f15f09bbc888bed3033f5c74ba86a3ee0e2ace7ad4df2839d29

See more details on using hashes here.

Supported by

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