Home > other >  Python bosses to see ah
Python bosses to see ah

Time:09-16

Status=int (input (" please choose your identity: 1: taxpayers \ n "))
Income=int (input (" enter your income: "))
Tax=0 if the status==1:
If income<=8350: tax income * 0.1=
Elif
Income<=33950: tax=8350 * 0.15 * 0.1 + (income - 8350)
Elif
Income<=82250: tax=8350 * 0.15 * 0.1 + (33950-8350) + (income - 33950) * 0.25
Elif income<=171550: tax=8350 * 0.15 * 0.1 + (33950-8350) + (82250-33950) + (income - 171550) * 0.28 * 0.25
Elif income<=372950: tax=8350 * 0.15 * 0.1 + (33950-8350) + (82250-33950) * 0.25 + 0.28 + (171550-82250) * (income - 372950) * 0.33
Elif income>=372950: tax=8350 * 0.15 * 0.1 + (33950-8350) + (82250-33950) + (171550-82250) * 0.28 * 0.25 + 0.33 + (372950-171550) * (income - 372950) * 0.35
Print (" should pay taxes and fees for: ", tax)
How to add this code input errors, it means that do not enter 1 will appear error (which is a calculation of taxes and fees)

CodePudding user response:

reference 1st floor lanzhen001 response:
 
Status=int (input (" please choose your identity: 1: taxpayers \ n "))

N=0
While the status!=1 and n<# 10: count, input error is more than 10 times out
Print (' input errors')
Status=int (input (" please choose your identity: 1: taxpayers \ n "))
N +=1
If the status==1:
Income=int (input (" enter your income: "))

If income<=8350:
Tax income * 0.1=
Elif income<=33950:
Tax=8350 * 0.1 + (income - 8350) * 0.15
Elif income<=82250:
Tax=8350 * 0.15 + 0.1 + (33950-8350), * (income - 33950) * 0.25
Elif income<=171550:
Tax=8350 * * 0.15 + 0.1 + (33950-8350) (82250-33950) + (income - 171550) * 0.28 * 0.25
Elif income<=372950:
Tax=8350 * * 0.15 + 0.1 + (33950-8350) (82250-33950) * 0.25 + 0.28 + (171550-82250) * (income - 372950) * 0.33
Elif income>=372950:
Tax=8350 * * 0.15 + 0.1 + (33950-8350) (82250-33950) + (171550-82250) * 0.28 * 0.25 + 0.33 + (372950-171550) * (income - 372950) * 0.35

Print (" should pay taxes and fees for: ", tax)

Ask the bosses

CodePudding user response:

reference 1st floor lanzhen001 response:
 
Status=int (input (" please choose your identity: 1: taxpayers \ n "))

N=0
While the status!=1 and n<# 10: count, input error is more than 10 times out
Print (' input errors')
Status=int (input (" please choose your identity: 1: taxpayers \ n "))
N +=1
If the status==1:
Income=int (input (" enter your income: "))

If income<=8350:
Tax income * 0.1=
Elif income<=33950:
Tax=8350 * 0.1 + (income - 8350) * 0.15
Elif income<=82250:
Tax=8350 * 0.15 + 0.1 + (33950-8350), * (income - 33950) * 0.25
Elif income<=171550:
Tax=8350 * * 0.15 + 0.1 + (33950-8350) (82250-33950) + (income - 171550) * 0.28 * 0.25
Elif income<=372950:
Tax=8350 * * 0.15 + 0.1 + (33950-8350) (82250-33950) * 0.25 + 0.28 + (171550-82250) * (income - 372950) * 0.33
Elif income>=372950:
Tax=8350 * * 0.15 + 0.1 + (33950-8350) (82250-33950) + (171550-82250) * 0.28 * 0.25 + 0.33 + (372950-171550) * (income - 372950) * 0.35

Print (" should pay taxes and fees for: ", tax)

What about this? The four options?
Status=int (input (" please select your identity: 1 single taxpayer, 2 notifier, married with 3 separate married notifier, four families to live: \ n ")) income=int (input (" enter your income: ")) tax=0 if the status==1: if income<=income * 0.1=8350: tax elif income<=33950: tax=8350 * 0.1 + (income - 8350) * 0.15 elif income<=82250: tax=8350 * 0.15 * 0.1 + (33950-8350) + (income - 33950) * 0.25 elif income<=171550: tax=8350 * 0.15 * 0.1 + (33950-8350) + (82250-33950) + (income - 171550) * 0.28 * 0.25 elif income<=372950: tax=8350 * 0.15 * 0.1 + (33950-8350) + (82250-33950) * 0.25 + 0.28 + (171550-82250) * (income - 372950) * 0.33 elif income>=372950: tax=8350 * 0.15 * 0.1 + (33950-8350) + (82250-33950) * * 0.28 + 0.25 + (171550-82250) (372950-171550) * 0.35 * 0.33 + (income - 372950) if the status==2: if income<=income * 0.1=16700: tax elif income<=67900: tax=16700 * 0.1 + (income - 16700) * 0.15 elif income<=137050: tax=16700 * 0.15 * 0.1 + (67900-16700) + (income - 67900) * 0.25 elif income<=208850: tax=16700 * 0.15 * 0.1 + (67900-16700) + (137050-67900) + (income - 137050) * 0.28 * 0.25 elif income<=372950: tax=16700 * 0.15 * 0.1 + (67900-16700) + (137050-67900) * 0.25 + 0.28 + (208850-137050) * (income - 208850) * 0.33 elif income>=372950: tax=16700 * 0.15 * 0.1 + (67900-16700) + (137050-67900) * * 0.28 + 0.25 + (208850-137050) (372950-208850) * 0.35 * 0.33 + (income - 372950) if the status==3: if income<=income * 0.1=8350: tax elif income<=33950: tax=8350 * 0.1 + (income - 8350) * 0.15 elif income<=68525: tax=8350 * 0.15 * 0.1 + (33950-8350) + (income - 33950) * 0.25 elif income<=104425: tax=8350 * 0.15 * 0.1 + (33950-8350) + (68525-33950) + (income - 68525) * 0.28 * 0.25 elif income<=186475: tax=8350 * 0.15 * 0.1 + (33950-8350) + (68525-33950) * 0.25 + 0.28 + (104425-68525) * (income - 104425) * 0.33 elif income>=186475: tax=8350 * 0.15 * 0.1 + (33950-8350) + (68525-33950) * * 0.28 + 0.25 + (104425-68525) (186475-104425) * 0.35 * 0.33 + (income - 186475) if the status==4: if income<=income * 0.1=11950: tax elif income<=45500: tax=11950 * 0.1 + (income - 11950) * 0.15 elif income<=117450: tax=11950 * 0.15 * 0.1 + (45500-11950) + (income - 45500) * 0.25 elif income<=190200: tax=11950 * 0.15 * 0.1 + (45500-11950) + (117450-45500) + (income - 117450) * 0.28 * 0.25 elif income<=372950: tax=11950 * 0.15 * 0.1 + (45500-11950) + (117450-45500) * 0.25 + 0.28 + (190200-117450) * (income - 190200) * 0.33 elif income>=372950: tax=11950 * 0.15 * 0.1 + (45500-11950) + (117450-45500) + (190200-117450) * 0.28 * 0.25 + 0.33 + (372950-190200) * (income - 372950) * 0.35 print (" should pay taxes and fees for: ", tax)nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related