In the nine-digit Social Insurance Number (SIN) given to each person having a job or filing...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In the nine-digit Social Insurance Number (SIN) given to each person having a job or filing an income tax return in Canada, the ninth digit is a checked digit that is used to test the validity of the other digits in the SIN. The ninth digit is determined by the following procedure. a. Double the 2nd, 4th, 6th, and 8th digits. b. Add the digits of the numbers found in step a c. Add the 1st, 3rd, 5th, and 7th digits. d. Add the numbers found in step (b) and (c). e. Subtract the unit digit of the result of step (d) from 10 and note the unit digit of the result. For the SIN to be valid, its ninth digit must have this value. Write a program that repeatedly read nine-digit numbers and determines whether or not each number is a valid SIN. The program should stop when it reads the value 999999999. Example: SIN 046 454 286 is a valid number 0 4 6 4 5 4 2 86 8 8 8 0 + 6 + 5 + 2 16->8+8+8+7=31 Step e: 10-4=6 Therefore, the SIN is valid. + = 13 44 Save your program as Sin_yourName Bullet proof number of digit entered (9) as well as the digits, not characters. Another valid sin #: 130692544 In the nine-digit Social Insurance Number (SIN) given to each person having a job or filing an income tax return in Canada, the ninth digit is a checked digit that is used to test the validity of the other digits in the SIN. The ninth digit is determined by the following procedure. a. Double the 2nd, 4th, 6th, and 8th digits. b. Add the digits of the numbers found in step a c. Add the 1st, 3rd, 5th, and 7th digits. d. Add the numbers found in step (b) and (c). e. Subtract the unit digit of the result of step (d) from 10 and note the unit digit of the result. For the SIN to be valid, its ninth digit must have this value. Write a program that repeatedly read nine-digit numbers and determines whether or not each number is a valid SIN. The program should stop when it reads the value 999999999. Example: SIN 046 454 286 is a valid number 0 4 6 4 5 4 2 86 8 8 8 0 + 6 + 5 + 2 16->8+8+8+7=31 Step e: 10-4=6 Therefore, the SIN is valid. + = 13 44 Save your program as Sin_yourName Bullet proof number of digit entered (9) as well as the digits, not characters. Another valid sin #: 130692544
Expert Answer:
Answer rating: 100% (QA)
Here is a Python program that verifies the validity of a SIN based on the given ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
This assignment requires you to complete the 2022 tax reporting for a fictional woman named Anna Smith. Question 1 T1 - step 4 - line 66 This is Anna's taxable income Answer: Question 2 T1 - step...
-
Given that log (2) 0.91 and log (5) 2.1, evaluate each of the following. Hint: use the properties of logarithms to rewrite the given logarithm in terms of the the logarithms of 2 and 5. a) log(0.4)~...
-
CeWe Color Holding AG is a Germany-based photofinishing holding company. It provides retail customers with color prints and offers digital and Internet services. It divides its business activities...
-
Barbital can be isolated from urine by solid-phase extraction with C18-silica. The barbital is then eluted with 1:1 vol/vol acetone:chloroform. Explain how this procedure works. CH,CH ,NH CH,CH,...
-
Differentiate between sex, gender, and sexuality, and illustrate how gender is culturally constructed.
-
Metters Cabinets, Inc., needs to choose a production method for its new office shelf, the Maxistand. To help accomplish this, the firm has gathered the following production cost data: Metters...
-
The trial balance of Ortiz Company as of January 31, 20X1, after the company completed the first month of operations, is shown in the partial worksheet below. Required: Complete the worksheet by...
-
What are Mercedes-Benz's mission, direction and objectives? (in europe)
-
Set up your ramp such that it has a 1 to 2 angle (make measurements so that you will be able to calculate your angle later). Place your motion detector at the HIGH end of the ramp (so the cart...
-
Q 1 a V X A thin rod of length 1 carries charge Q (Q> 0), spread uniformly. Point a is at distance r above the middle; point b is at distance r from the right end. (a) Find the E-field vector at...
-
Write a report of 1500 words about Vinamilk company. The following guideline details as below: 1. Present market opportunities/threats (changes/trends) relating to your chosen brand and product in...
-
Watch video: https://www.youtube.com/watch?v=eu8dN4n_eV8 List how you can improve your value statements in your Benefit section How might you apply this to really improve selling your product and...
-
A projectile with mass 6 kg is fired from a catapult at an enemy's castle. The position of the projectile's location is recorded at six different times. All distances have been measured in meters. 1...
-
Make a presentation on Introduction to Social Media for Professionals, program for new clients at Parker Community Career Center.
-
If M = 7, s = 2, and X = 9.5, what is z?
-
Sandblasting is a process in which an abrasive material, entrained in a jet, is directed onto the surface of a casting to clean its surface. In a particular setup for sandblasting, the casting of...
-
\(f(t)=\delta(t-\tau)\) corresponds to a force applied at a. \(t-\tau=0\) b. \(t-\tau <0\) c. \(t-\tau>0\)
-
Find the response of a viscously damped system under the periodic force whose values are given in Problem 1.116. Assume that \(M_{t}\) denotes the value of the force in newtons at time \(t_{i}\)...
Study smarter with the SolutionInn App