Add files test.py tutorial.py sympy.py
This commit is contained in:
parent
85c033640e
commit
45a2a118e9
22
sympy.py
Normal file
22
sympy.py
Normal 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
11
test.py
Normal 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
26
tutorial.py
Normal 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()
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user