Skip to main content

CAS tools for danish high schools.

Project description

GYM CAS

PyPI - Version PyPI - Python Version Coverage

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

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, startgæt )
solve_interval( udtryk, start, slut )

Opstille ligning

For at opstille en ligning kan man enten omforme sin ligning så en af siderne er lig 0 (og udelade 0) eller bruge Eq.

Ligningen x/2 = 10 kan skrives som x/2-10 eller som Eq(x/2, 10).

Ligningsløsning ved solve(x/2-10) eller solve(Eq(x/2, 10)) giver samme resultat.

B3. Geometri og trigonometri

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

B4. Analytisk plangeometri

plot_points( X_list ,Y_list)
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 = vector(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)) # Betingelser kan sammensættes med &

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 ))
plot3d_revolution( udtryk , (x, a, b),parallel_axis="x")

A1. Vektorer i rummet

a = vector(1,2,3)
a.cross(b)
plot_vector( a )
plot3d_points( X, Y, Z )
plot3d_line( a + t * r )
plot3d_plane( a + s * r1 + t * r2 )
plot3d_sphere( radius, centrum )
plot3d_implicit( ligning, backend=PB ) # Kræver Plotly eller K3D

A4. Differentialligninger

f = Function('f')
dsolve( ode )
plot_ode( ode, (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


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

gym_cas-1.1.3.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

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

gym_cas-1.1.3-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gym_cas-1.1.3.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gym_cas-1.1.3.tar.gz
Algorithm Hash digest
SHA256 877f084e77586db3fdc041b2a97a75efbf1e62a54dea6b7d8216042050ff8443
MD5 abfe00f6372203997f8123bbc23f5132
BLAKE2b-256 589c9dd59e79bf8bd8b661bebbd95803407f83585fba5c6f32d40b664c19e54b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gym_cas-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gym_cas-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ed1549d808cb4c626df88610aa258914bb41b6dcb1f4e5af03dd5e9dfe91bd0f
MD5 e99004cb0469aa6ef6eeabcd40b087f4
BLAKE2b-256 e659f2fb7f4eb694a921a360f44558ff18eb33f2108f52179c7975dac820611c

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