Skip to content

Instantly share code, notes, and snippets.

@surgicalmaskman
Created February 8, 2018 20:15
Show Gist options
  • Save surgicalmaskman/2cce06f7575b54b74175340f52474095 to your computer and use it in GitHub Desktop.
Save surgicalmaskman/2cce06f7575b54b74175340f52474095 to your computer and use it in GitHub Desktop.
# copyright (C) 2018 @surgical21
# this sorcecode provife under Mozilla Public License v1.1 / GNU GPL v2
#!/usr/bin/env python
# -*- coding: utf8 -*-
import math
income= int(input('給与所得控除後の金額 >'))
excempt= int(input('所得控除後の合計額 >'))
base= math.floor((income-excempt)/1000)
if base <= 1950:
tax= base * 0.05
if base > 1950 and base <= 3300:
tax= (base*0.1) - 97.5
if base > 3300 and base <= 6950:
tax= (base*0.2) - 427.5
if base > 6950 and base <=900:
tax= (base*0.23) - 636
#teq tôhoku earthquake
teq = (tax*1000)*0.021
if (teq%10) != 0:
teq= teq/100
teq= math.floor(teq)
teq= teq*100
print('--')
print('所得税=', tax*1000)
print('復興特別税=', teq)
print('源泉徴収税額=',int((tax*1000)+teq))
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment