Jan-31-2021, 09:18 AM
Hello, it looks pretty good to me.
Otherwise, pretty good! You can try to open the file in a code editor and select code formatting option to do an automatic check for you. Or run a PEP8 check on the code.
It seems like online checkers exist too, I wasn't aware of that before: http://pep8online.com/
National_Insurance = 12 # 12% after £183 Tax_Limit = 37000 Tax_Allowance = 12500Usually constants are found in the beginning of code (and after imports, if there would be any, but not in your case).
Yearly_Tax = round(Weekly_Tax * 52,2) Weekly_Take_Home = round(Weekly_Income - Weekly_NI - Weekly_Tax,2) Yearly_Take_Home = round(Weekly_Take_Home * 52,2) Monthly_Take_Home = round(Yearly_Take_Home / 12,2)I would not leave any blank lines between these statements, but that is up to your preference.
Monthly_Take_Home = round(Yearly_Take_Home / 12,2) Monthly_Take_Home = round(Yearly_Take_Home / 12, 2) # a whitespace after commaAlso in cases like this, a whitespace after comma is recommended.
Otherwise, pretty good! You can try to open the file in a code editor and select code formatting option to do an automatic check for you. Or run a PEP8 check on the code.
It seems like online checkers exist too, I wasn't aware of that before: http://pep8online.com/