From bb549648fc2c5a29397ba5141f65e648325a3e96 Mon Sep 17 00:00:00 2001 From: stockth Date: Wed, 24 Jul 2019 07:10:18 +0200 Subject: [PATCH 1/2] t --- Formeln.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Formeln.py b/Formeln.py index e7250e8..a5cbfa5 100644 --- a/Formeln.py +++ b/Formeln.py @@ -3,21 +3,28 @@ import Klassen as k konstante_eins = k.Groesse(None, None, True, 1) Formeln = [k.Formel('Kraftformel', i=k.Groesse('F', 'N', False), a=k.Groesse('m', 'kg', False), - b=k.Groesse('a', 'm/s²', False), z=k.Groesse(None, None, True, 1), y=k.Groesse(None, None, True, 1), - x=k.Groesse(None, None, True, 1)), + b=k.Groesse('a', 'm/s²', False), c=konstante_eins, z=konstante_eins, + y=konstante_eins, x=konstante_eins), k.Formel('Gleichm. beschl. Bew.', i=k.Groesse('s', 'm', False), a=k.Groesse(None, None, True, 0.5), b=('a', 'm/s^2', False), c=k.Groesse('t', 's', False), z=konstante_eins, x=konstante_eins, y=k.Groesse(None, None, True, 2)), k.Formel('Gewichtskraft', i=k.Groesse('Fg', 'N',False), a=k.Groesse(None,None,True,9.81),b=('h','m',False), - z=konstante_eins,y=konstante_eins,x=konstante_eins), + c=konstante_eins, z=konstante_eins,y=konstante_eins,x=konstante_eins), k.Formel('Spannenergie', i=k.Groesse('Espann','J', False), a=k.Groesse(None, None, True, 0.5), b=k.Groesse('D', 'N/m', False), c=k.Groesse('s', 'm', False), x=konstante_eins, y=konstante_eins, z=k.Groesse(None, None, True, 2)), - k.Formel('Potentielle Energie' , i=k.Groesse('Epot','J',False),b=k.Groesse('m','kg', False), - c=k.Groesse('Höhe','m',False), z=konstante_eins,y=konstante_eins,x=konstante_eins), + k.Formel('Potentielle Energie' , i=k.Groesse('Epot','J',False),a=k.Groesse('m','kg', False), + b=k.Groesse(None, None, True, 9.81), c=k.Groesse('h','m',False), z=konstante_eins, + y=konstante_eins,x=konstante_eins), k.Formel('Kinetische Energie',i=k.Groesse('Ekin','J', False), a=k.Groesse(None, None, True, 0.5), b=('m', 'kg', False), c=('v', 'm/s', False), z=konstante_eins, x=konstante_eins, y=k.Groesse(None, None, True, 2)), k.Formel('Elektrische Leistung', i=k.Groesse('P', 'W', False), a=k.Groesse('U', 'V', False), - b=k.Groesse('I','A', False), c=konstante_eins, z=konstante_eins, x=konstante_eins, y=konstante_eins) + b=k.Groesse('I','A', False), c=konstante_eins, z=konstante_eins, x=konstante_eins, y=konstante_eins), + k.Formel('Wiederstand', i=k.Groesse('R', 'Ohm', False), a=k.Groesse('U', 'V', False), + b=k.Groesse('I', 'A', False), c=konstante_eins, z=konstante_eins, y=k.Groesse(None, None, True, -1), + x=konstante_eins), + k.Formel('Impuls', i=k.Groesse('p', 'N*s', False), a=k.Groesse('m', 'kg', False), + b=k.Groesse('v', 'm/s', False), c=konstante_eins, z=konstante_eins, y=konstante_eins, + x=konstante_eins), ] From 124957e43a48615054ec2aa4d5027e3e1b99f1d7 Mon Sep 17 00:00:00 2001 From: stockth Date: Wed, 24 Jul 2019 07:34:05 +0200 Subject: [PATCH 2/2] t --- Formeln.py | 7 +++++++ Main.py | 0 user-IO.py | 0 3 files changed, 7 insertions(+) create mode 100644 Main.py create mode 100644 user-IO.py diff --git a/Formeln.py b/Formeln.py index 6f7d7b4..acef9c7 100644 --- a/Formeln.py +++ b/Formeln.py @@ -31,3 +31,10 @@ Formeln = [k.Formel('Kraftformel', i=k.Groesse('F', 'N', False), a=k.Groesse('m' b=k.Groesse('v', 'm/s', False), c=konstante_eins, z=konstante_eins, y=konstante_eins, x=konstante_eins) ] + + +def looper(geg, ges): + for formel in Formeln: + temp_is_solvable = formel.is_solvable(geg, ges) + if temp_is_solvable[0]: + formel.solve(temp_is_solvable[1]) \ No newline at end of file diff --git a/Main.py b/Main.py new file mode 100644 index 0000000..e69de29 diff --git a/user-IO.py b/user-IO.py new file mode 100644 index 0000000..e69de29