1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lana66690 [7]
2 years ago
7

My assignment asks me to write a python program using if, elif, and else that takes a user's salary and calculates the tax based

on three given criteria:
> for a salary between 10,000 and 20,000, tax is at 1%
> for a salary between 20,000 and 30,000, tax is at 2%
> for a salary greater than 30,000, tax is at 3%
> there is no tax otherwise

Criteria 1 and 2 seem to overlap because of 20,000. How can I solve this? Thanks!
Computers and Technology
1 answer:
Goryan [66]2 years ago
8 0

Answer:

user_salary = int(input("Please Enter Your Salary : "))

if user_salary in range(10000, 20000):

   print("Tax = ",int(user_salary/100*1))

elif user_salary in range(20000, 30000):

   print("Tax = ",int(user_salary/100*2))

elif user_salary in range(30000, 40000):

   print("Tax = ",int(user_salary/100*3))

else:

   print("No Tax!")

Explanation:

You might be interested in
Ask how many apples the user wants. Ask how many people the user will share the apples with. Find out how many apples will remai
Sati [7]

Answer:

The program in Python is as follows:

apples = int(input("Apples: "))

people = int(input("People: "))

apples%=people

print("Remaining: ",apples)

Explanation:

This gets the number of apples

apples = int(input("Apples: "))

This gets the number of people to share the apple

people = int(input("People: "))

This calculates the remaining apple after sharing the apple evenly

apples%=people

This prints the calculated remainder

print("Remaining: ",apples)

5 0
3 years ago
Which elements are visible when a user opens a new PowerPoint presentation?
Mariulka [41]

Answer:

The only element visible is the presentation itself.

Explanation:

All of the other options, such as presenter's assistance, is hidden away from the projector, presentation device, etc. You are the only one that can see the window that shows what slide is next, presenter's notes, etc. <u>In other words, whatever you want the audience to see, that is only what they will see and nothing else.</u>

3 0
3 years ago
Read 2 more answers
I need the solution to this task please anyone
KIM [24]

Answer:

.

Explanation:

8 0
3 years ago
Which of the following is the fastest processor
Nookie1986 [14]
Usually a Xeon is the fastest. Matters what time it was built and the chipset. If its old, the i7 is faster.
6 0
3 years ago
I need help pleaseeee
MrRissso [65]

Answer:

Explanation:

I  ....

6 0
3 years ago
Other questions:
  • To change the print orientation from portrait to landscape, tap or click the ____ button on the print preview tab.
    15·1 answer
  • Which statement is used to create a file object that will append data to an existing file? BufferedWriter salesdata =
    7·2 answers
  • 1 megabyte is equal to 1024 gigabyte. True/False​
    11·2 answers
  • Should the existing system be replaced?This is a question that is asked during the _____ stage of the Systems Development Life C
    8·1 answer
  • What are three softwares for cloud computing
    8·1 answer
  • You are contacted by a project organizer for a university computer science fair. The project organizer asks you to hold a forum
    10·1 answer
  • How do I take this prodram back off
    15·1 answer
  • If I want to add a new slide to my presentation, which option would I click on?
    5·1 answer
  • Which one is the right code
    10·1 answer
  • Superclass in python explanation
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!