Data Interview Qs - Generating automated tax estimates

InterviewQs

Generating automated tax estimates

Python Algorithms Logic

Forward this email to a friend or colleague and challenge them to solve it.

Hi, 

Suppose you're working for an accounting firm and looking to automate some tax estimates for clients. Under the relevant tax laws, an individual is taxed at 45% for any annual earnings >= 2M USD. For any earnings < 2M USD, the individual is taxed at a lower rate of 35%.

Write a function to calculate both the pre-tax and post-tax earnings for a given individual, with the ability to feed in the gross pre-tax earnings as an input.

For example, if an individual earns 2.6M USD for the year, your function should return:

  • Pre-tax earnings were 2,600,000 for the year.
  • Post-tax earnings were 2,000,000 * .65 + 600,000 * .55 = 1,630,000 for the year

Our solution will be written in Python for premium users.


 

You’ve accumulated 407 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe

Key phrases

Older messages

Probability of eye colors

Friday, February 3, 2023

Statistics, Probability Theory, Conditional Probability, InterviewQs Probability of eye colors Statistics Probability Theory Conditional Probability Forward this email to a friend or colleague and

Number of pairs in SQL

Wednesday, February 1, 2023

SQL, Database Querying, Subquery, InterviewQs Number of pairs in SQL SQL Database Querying Subquery Forward this email to a friend or colleague and challenge them to solve it. Hi, Suppose you're

Simulating dice rolls

Monday, January 30, 2023

Python, Arrays, Data Structures, Algorithms, Simulation, Data Visualization, InterviewQs Simulating dice rolls Python Arrays Data Structures Algorithms Simulation Data Visualization Forward this email

Unioning two arrays

Friday, January 27, 2023

Python, Algorithms, Data Structures, InterviewQs Unioning two arrays Python Algorithms Data Structures Forward this email to a friend or colleague and challenge them to solve it. Hi, Given array A

Random course schedule

Wednesday, January 25, 2023

Statistics, Probability, Combinations, InterviewQs Random course schedule Statistics Probability Combinations Forward this email to a friend or colleague and challenge them to solve it. Hi, Suppose

You Might Also Like

Apple AI browser 🌎, Tesla fires Supercharger team ⚡,  new sudo replacement 👨‍💻

Wednesday, May 1, 2024

Apple is testing a version of its Safari web browser that includes an AI-powered tool called Intelligent Search Sign Up |Advertise|View Online TLDR Together With Modern Treasury TLDR 2024-05-01 The

JSter #218 - Libraries and more

Wednesday, May 1, 2024

All JavaScript is good JavaScript. I'm close to done with my SurviveJS rework. The new site will have more content while being much lighter and faster to compile so that's all good. Libraries

BetterDev #258 - Build an 8-bit computer from scratch and Home automation with ESP8266

Wednesday, May 1, 2024

Better Dev #258 Apr 30, 2024 Hi all, We come back with a new issue this week. If you like BetterDev, please help spead word out by refer to your friends. Buy me a coffee would be great too. Build an 8-

Interface Interference 👎

Wednesday, May 1, 2024

Amid the AI device dunking, should everything “just be an app”? Here's a version for your browser. Hunting for the end of the long tail • April 30, 2024 Interface Interference The problem

Some Tesla Supercharger jobs get a jolt

Tuesday, April 30, 2024

Plus: Amazon CodeWhisperer changes its name and Arc gets a Windows version View this email online in your browser By Christine Hall Tuesday, April 30, 2024 Welcome to TechCrunch PM, bringing you the

Relief From Tinnitus: Free Discovery Call!

Tuesday, April 30, 2024

Do you suffer from tinnitus or a ringing in your ears? 1 in 3 adults over the age of 65 will suffer from this condition and often don't know there are things you can do to help. Our friends at

WebAIM April 2024 Newsletter

Tuesday, April 30, 2024

WebAIM April 2024 Newsletter Read this newsletter online at https://webaim.org/newsletter/2024/april Feature Web Accessibility in the 2024 Presidential Campaigns WebAIM's John Northup ran the US

👀 Being More Productive on a Smaller Screen — How to Hide Games on Steam Family Sharing

Tuesday, April 30, 2024

Also: What to Expect From Apple's "Let Loose" Event, and More! How-To Geek Logo April 30, 2024 Did You Know The letter J is the only letter that makes no appearance on the Periodic Table.

PEP 686, Lazy Evaluation, Serverless Python, and More

Tuesday, April 30, 2024

PEP 686: Make UTF-8 Mode Default #627 – APRIL 30, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo PEP 686: Make UTF-8 Mode Default This Python Enhancement Proposal outlines making UTF-8 the default

Daily Coding Problem: Problem #1427 [Easy]

Tuesday, April 30, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Amazon. Given an array and a number k that's smaller than the length of the array,