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
Which method adds 10 to the right end of the array?<br> myArray.<br> insert<br> (10)
vladimir1956 [14]

JavaScript has a set of mutator functions that allow you to modify the contents of an array without referencing the individual elements.To add to to myArray we us the push() method

<h3>Adding Elements to an Array</h3>

To add to to myArray we us the push() method

(10)

myArray.push(10)

There are two mutator functions for adding elements to an array: push() and unshift(). The push() function adds an element to the end of an array:

var nums = [1,2,3,4,5]; print(nums); // 1,2,3,4,5 nums.push(6);

print(nums); // 1,2,3,4,5,6

var nums = [1,2,3,4,5]; print(nums); // 1,2,3,4,5 nums[nums.length] = 6; print(nums); // 1,2,3,4,5,6

Learn more about arrays here:

brainly.com/question/24275089

6 0
2 years ago
I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
liq [111]
The number of bullet points on a slide should not exceed till 8
3 0
3 years ago
What is the biggest difference between a movie and a game?
sveta [45]

Answer:

It could be D

Explanation:

3 0
2 years ago
Insurance can help you:a. minimize monthly expenses
KIM [24]
This is an easy answer sure in the back of your mind u knew it was b good luck :).

4 0
3 years ago
Help! What is this graph and what does it represent?
Lunna [17]

Answer:

Explanation:

how much something had in each month in this graph

7 0
3 years ago
Other questions:
  • What runs a network, steering information between computers and managing security and users?
    11·1 answer
  • When talking about the physical elements of the internet, the term redundancy refers to:?
    13·1 answer
  • We must know the Inflation Rate and the Nominal GDP in order to calculate Real GDP.
    15·1 answer
  • Method x1() has code that calls method x2(). Method x2() has the following header.
    7·1 answer
  • Courteous behavior on the road will
    10·2 answers
  • The _____ handles the instructions for your computer to start up before the operating system is loaded.
    11·1 answer
  • When discussing the data-modeling building blocks, anything (a person, a place, a thing, or an event) about which data are to be
    15·1 answer
  • WILL GIVEE BRAINLIEST ANSWER!!!!
    14·1 answer
  • Select four tasks associated with operating system maintenance. Cleaning inside the computer Defragmenting the hard drive Deleti
    11·1 answer
  • Tom teaches in a high school. He wishes to sort a spreadsheet containing students' marks in various subjects by descending order
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!