From 45a2a118e963e257b65fe1e35d8e959edf767de3 Mon Sep 17 00:00:00 2001 From: git-sandro Date: Thu, 18 Sep 2025 23:45:09 +0200 Subject: [PATCH] Add files test.py tutorial.py sympy.py --- sympy.py | 22 ++++++++++++++++++++++ test.py | 11 +++++++++++ tutorial.py | 26 ++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 sympy.py create mode 100644 test.py create mode 100644 tutorial.py diff --git a/sympy.py b/sympy.py new file mode 100644 index 0000000..13aef43 --- /dev/null +++ b/sympy.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Thu Sep 18 17:47:51 2025 + +@author: s +""" +import sympy as sp; +import IPython.display as dp; +sp.init_printing(); + +# Konfiguration +x, y, z = sp.symbols('x, y, z') + +# Berechnugen +f = (5*x**2-x**(1/2))*(y+x*y) +g=sp.expand(f) #ausmultiplizieren +h=sp.simplify(f) #vereinfachen +i=sp.factor(f) #faktorisieren + +#Ausgabe +dp.display(f) \ No newline at end of file diff --git a/test.py b/test.py new file mode 100644 index 0000000..583bade --- /dev/null +++ b/test.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Thu Sep 18 18:26:21 2025 + +@author: s +""" + +from sympy import * + +init_printing() \ No newline at end of file diff --git a/tutorial.py b/tutorial.py new file mode 100644 index 0000000..3bcc5df --- /dev/null +++ b/tutorial.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Thu Sep 18 17:10:29 2025 + +@author: s +""" + +import numpy as np + +# Berechnungen +def main(): + a=4+7 + b=7*9 + c=np.log(10)/np.log(4) + d=np.sin(np.pi/2) + + # Ausgabe + print(f"a: {a}") + print(f"b: {b}") + print(f"c: {c}") + print(f"d: {d}") + +main() + +