Question
PLEASE DO ALL 3 THIS IN PYTHON AND MAKE THE CODE COPYABLE!! 1) Program 3: Design (pseudocode) and implement (source code) a program (name it
PLEASE DO ALL 3 THIS IN PYTHON AND MAKE THE CODE COPYABLE!!
1) Program 3: Design (pseudocode) and implement (source code) a program (name it Circles) to determine if a circle is either completely inside, overlapping with, or completely outside another circler. The program asks the user to enter the center point (X1, Y1) and the radius (R1) for the first circle C1, and the center point (X2, Y2) and the radius (R2) for the second circle C2. The program then determines if the second circle C2 is either completely inside, or overlapping with, or completely outside the first circle C1. Hint: use the sum of R1 and R2 and the distance between the centers to solve the problem. Document your code, properly label the input prompts, and organize the outputs as shown in the following sample runs.
Sample run 1:
Circle 1 center is: (0,0)
Circle 1 radius is: 6
Circle 2 center is: (1,1)
Circle 2 radius is: 1
Judgment: Circle 2 is completely inside circle 1
Sample run 2:
Circle 1 center is: (0,0)
Circle 1 radius is: 2
Circle 2 center is: (7,7)
Circle 2 radius is: 1
Judgment: Circle 2 is completely outside circle 1
Sample run 3:
Circle 1 center is: (0,0)
Circle 1 radius is: 3
Circle 2 center is: (2,2)
Circle 2 radius is: 3
Judgment: Circle 2 is overlapping with circle 1
2) Program 4: Design (pseudocode) and implement (source code) a program (name it IncomeTax) that reads from the user annual income, as integer value, and calculates the income tax based on the tax table below.
Income | Tax bracket |
Annual income <= $50,000 | 5% |
$50,000 < Annual income <= $200,000 | 10% |
$200,000 < Annual income <= $400,000 | 15% |
$400,000 < Annual income <= $900,000 | 25% |
$900,000 < Annual income | 35% |
The program output should include the entered annual income followed by the applied tax bracket and the tax amount. Document your code and properly label the input prompts and the outputs as shown below.
Note: Taxes are computed based on brackets. For example, if ones income falls in the 25% bracket, the first $50,000 is taxed at 5% rate, the next $150,000 is taxed at the 10% rate, the next $200,000 is taxed at 15% rate, and the remaining income is taxed at the 25% rate. See sample run 3 below.
Sample run 1:
Annual Income: $25,000
Tax Bracket: 5%
Tax due amount: $1250
Sample run 2:
Annual Income: $350,000
Tax Bracket: 15%
Tax due amount: $40,000
Sample run 3:
Annual Income: $800,000
Tax Bracket: 25%
Tax due amount: $147500
Sample run 4:
Annual Income: $1,000,000
Tax Bracket: 35%
Tax due amount: $207,500
3) Program 5: The concept of a 5-digit palindrome number is a 5-digit number that reads the same from left to right and from right to left. For example, 12121, 45454, and 14741 are valid 5-digit palindrome numbers. Design (pseudocode) and implement (source code) a program (name it FiveDigitPalindrom) that reads a 5-digit number from the user (as integer value, not string) and then mathematically (using division and remainder operations) determines whether the entered number is a 5-digit palindrome or not. Assume valid inputs are from 11111 to 9999. The program rejects any input outside that range with the message Invalid 5-digit number. Try again. Document your code and properly label the input prompts and the outputs as shown below.
Sample run 1:
Entered number: 6754
Judgment: Invalid 5-digit number. Try again
Sample run 2:
Entered number: 12321
Judgment: Valid 5-digit palindrome
Sample run 3:
Entered number: 12324
Judgment: Invalid 5-digit palindrome
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started