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
My HTC Desire 510's mobile data stopped working, how to I make it work again?
denis-greek [22]
Ask your mobile operator
2.go to hrs service
3. Turn on and turn off
4 0
3 years ago
Write a function analyze_text that receives a string as input. Your function should count the number of alphabetic characters (a
laiz [17]

Answer:

def analyze_text(sentence):

   count = 0

   e_count = 0

   for s in sentence:

       s = s.lower()

       if s.isalpha():

           count += 1

       if s == "e":

           e_count += 1

   return "The text contains " + str(count) + " alphabetic characters, of which " + str(e_count) + " (" + str(e_count*100/count) + "%) are ‘e’."

Explanation:

Create a function called analyze_text takes a string, sentence

Initialize the count and e_count variables as 0

Create a for loop that iterates through the sentence

Inside the loop, convert all letters to lowercase using lower() function. Check each character. If a character is a letter, increment the count by 1. If a character is "e", increment the e_count by 1.

Return the count and e_count in required format

5 0
3 years ago
data is transmitted in plain text. this is a: group of answer choices brute force attack session hijacking dictionary attack cry
Anton [14]

The data that is transmitted in plain text is option D: cryptographic failure.

<h3>An established plain text only assault is what?</h3>

The known-plaintext attack (KPA) is a cryptanalysis assault type where the attacker has access to both the encrypted and plaintext versions of the data (also known as a crib) (ciphertext). These can be used to reveal additional hidden information, including code books and secret keys.

Therefore, Plaintext in the context of cryptography typically refers to unencrypted data that is being prepared for input into cryptographic techniques, typically encryption algorithms. Typically, unencrypted data transmission or storage falls under this category.

Learn more about data transmission from

brainly.com/question/10564419
#SPJ1

5 0
1 year ago
State one way the projector can be integrated into teaching and learning ​
koban [17]

Answer:

The projector con be used to show videos or pictures on a particular subject or topic to gain more understanding

4 0
3 years ago
Why is group design better or worse for coding projects ?....will report for a dum answer U ` U
DedPeter [7]

there are many styles of coding think about it like art if you had 15 painters working on the same 4x4 painting it would look like a mess.

-scav

8 0
3 years ago
Other questions:
  • PLEASE HELP Which of the following is considered a modern method of communication?
    6·2 answers
  • You use worksheets to perform calculations. How do you perform these calculations?
    15·2 answers
  • Explain the steps users can take to maintain an operating system
    15·1 answer
  • When was unicode invented?
    13·1 answer
  • IN THE MOVIE BACK TO THE FUTURE 1985 IS 1985 THE PUBLICATION DATE?WHERE CAN I FIND THE MOVIE?
    6·1 answer
  • What allows users to connect via the Internet to its private network?
    11·2 answers
  • Which method is used for resolving data dependency conflict by the compiler itself?
    6·1 answer
  • mta software development fundamentals You are creating an application that accepts input and displays a response to the user. Yo
    10·1 answer
  • Write convert() method to cast double to int
    7·1 answer
  • What happens when i expose a disk to magnetic fields?​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!