Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please answer this question correctly PROBLEM 1 Data type conversions and formatting ( 3 points) You and your friends just won the lottery. Now you

please answer this question correctly image text in transcribed
PROBLEM 1 Data type conversions and formatting ( 3 points) You and your friends just won the lottery. Now you need to figure out how much money everyone is entitled to. To do this you will be writing a short program that prompts the user for the amount they won, the number of people who are splitting the winnings, and the tax rate that will be applied to each person's share. Your program should then figure out how much each person will earn after taxes are applied to each share. INPUT: Your program accepts the total amount won, the number of people who are splitting the winnings, and the tax rate (as an integer - i.e. 35=35% ). Ensure that you store your data using variables of the appropriate data type. OUTPUT: Compute the total amount won, the amount of each share, the tax due on each share and the final take-home amount for each person. Ensure that each of these values is formatted to two decimal places, and that the "comma" separator is included in your currency values, if necessary. Here are two sample input/output examples. Note that each sentence begins on a new line. You can perform all mathematical operations with f1oat () functions and float division - the IRS is okay with a penny or two missing from tax payment. User input is underlined: Example 1 How much money did you win? 1000000 How many people are splitting the winnings? 4 What is the percent tax rate on lottery winnings? 25 As a group, you've won $1,000,000.00 ! Congratulations! Split 4 ways, that amounts to $250,000.00 in winnings per person. Since the tax rate is 254, each person must pay $62,500,00 in taxes. Each person wi11 take home $187,500.00 after taxes. Example 2 How much money did you win? 5000000 How many people are splitting the winnings? 5 What is the percent tax rate on lottery winnings? 10 As a group, you've won $5,000,000.00 ! Congratulations! Split 5 ways, that amounts to $1,000,000,00 in winnings per person. Since the tax rate is 10%, each person muat pay $100,000,00 in taxes. Each person wi11 take home $900,000.00 after taxes

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions