commit message from python script
This commit is contained in:
BIN
LohnRechner/data
Normal file
BIN
LohnRechner/data
Normal file
Binary file not shown.
56
LohnRechner/lohn_calc.py
Normal file
56
LohnRechner/lohn_calc.py
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
#! /usr/bin/env python3.10
|
||||||
|
|
||||||
|
|
||||||
|
import shelve, os
|
||||||
|
#spieler_endrunde = ['Heinz', 'Schrödinger', 'Bill']
|
||||||
|
#speicher = shelve.open('meineDaten')
|
||||||
|
#speicher['imFinale'] = spieler_endrunde
|
||||||
|
#speicher.close()
|
||||||
|
|
||||||
|
#mein_speicher = shelve.open('meineDaten') #magie
|
||||||
|
#print(mein_speicher['imFinale'])
|
||||||
|
#spieler = mein_speicher['imFinale']
|
||||||
|
#for name in spieler:
|
||||||
|
# print(name)
|
||||||
|
#mein_speicher.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class steuer_rechner:
|
||||||
|
def __init__(self, lohn_eingabe = int) -> None:
|
||||||
|
self.lohneingabe = lohn_eingabe
|
||||||
|
self.data_datei = os.path.dirname(os.path.realpath(__file__)) + os.sep + "data"
|
||||||
|
print(self.data_datei)
|
||||||
|
if not os.path.exists(self.data_datei):
|
||||||
|
month = ['Jan', 'Feb', 'Mae']
|
||||||
|
month_dict = dict.fromkeys(month, 0)
|
||||||
|
with shelve.open(self.data_datei) as db:
|
||||||
|
db['Lohn'] = month_dict
|
||||||
|
|
||||||
|
with shelve.open(self.data_datei) as db:
|
||||||
|
print(db['Lohn'])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def prozent_rechner(self, prozent):
|
||||||
|
prozent_wert = self.lohneingabe * (prozent / 100)
|
||||||
|
sum_wert = self.lohneingabe + prozent_wert
|
||||||
|
sum_min = self.lohneingabe - prozent_wert
|
||||||
|
return {
|
||||||
|
"sum" : sum_wert,
|
||||||
|
"wert": prozent_wert,
|
||||||
|
"min" : sum_min
|
||||||
|
}
|
||||||
|
|
||||||
|
def lohn_steuer_klass2(self):
|
||||||
|
pass
|
||||||
|
def main(self):
|
||||||
|
test = steuer_rechner.prozent_rechner(self, prozent=18.1)
|
||||||
|
print(test)
|
||||||
|
#print(self.lohneingabe)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
rechnen = steuer_rechner(lohn_eingabe=232)
|
||||||
|
rechnen.main()
|
||||||
|
|
||||||
BIN
LohnRechner/meineDaten
Normal file
BIN
LohnRechner/meineDaten
Normal file
Binary file not shown.
Reference in New Issue
Block a user