Add files test.py tutorial.py sympy.py

This commit is contained in:
git-sandro 2025-09-18 23:45:09 +02:00
parent 85c033640e
commit 45a2a118e9
3 changed files with 59 additions and 0 deletions

22
sympy.py Normal file
View File

@ -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)

11
test.py Normal file
View File

@ -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()

26
tutorial.py Normal file
View File

@ -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()