Python Forum
String formatting - tax brackets
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String formatting - tax brackets
#1
In progressive tax systems, tax rates change according to the income. Tax brackets are divisions that regulate those changes.

Here's an example of tax brackets in a certain tax system:

0 — 15,527: 0% tax

15,528 — 42,707: 15% tax

42,708 — 132,406: 25% tax

132,407 and more: 28% tax

Suppose we use a simplified version of taxation and apply one tax rate to the entire amount of money.

Write a program that calculates the tax that a person's going to pay based on their income.

The input format:

The value of someone's taxable income (in dollars).

The output format:

The tax for {income} is {percent}%. That is {calculated_tax} dollars!

Round your calculated_tax to the nearest integer.
Reply
#2
Please make an effort to write this code.
Then, if needed ask specific questions, and include code and errors using bbcode.
Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Sad Check if a given string has its open brackets closed by the same type of brackets? noahverner1995 1 1,276 Apr-11-2022, 02:13 PM
Last Post: deanhystad
  print on a single line with start/end brackets and commas Paulman 2 1,886 Oct-23-2021, 10:00 AM
Last Post: Paulman
  String formatting issues? lolatyou 2 2,103 Mar-08-2020, 06:53 AM
Last Post: michael1789
  week 1 python help - string formatting ? raymond2688 20 8,002 Jul-09-2019, 08:10 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020