From 6786e5fafb3e50189f1319a507df50cab0cfb843 Mon Sep 17 00:00:00 2001 From: git-sandro Date: Fri, 19 Sep 2025 00:16:43 +0200 Subject: [PATCH] change names of file --- numpy_tutorial.py | 26 ++++++++++++++++++++++++++ sympy_tutorial.py | 22 ++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 numpy_tutorial.py create mode 100644 sympy_tutorial.py diff --git a/numpy_tutorial.py b/numpy_tutorial.py new file mode 100644 index 0000000..3bcc5df --- /dev/null +++ b/numpy_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() + + diff --git a/sympy_tutorial.py b/sympy_tutorial.py new file mode 100644 index 0000000..7614ae4 --- /dev/null +++ b/sympy_tutorial.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