subject
Computers and Technology, 07.12.2020 18:00 2891643

1. Python Exercise 4
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, if it will become a 2 digit number, add all the digits to make it a single digit. For example, 6x2 =12, then 1+2=3
b. Add the digits of the number found in step (a)
c. Add the 1st, 3rd, 5th, and 7th digits.
d. Add the number found in steps (b) and (c)
e. Subtract the units digit of the result of step (d) from 10 and note the units digit of the
result. For the SIN to be valid, its ninth digit must have this value.
Write a program that repeatedly reads nine-digit numbers and determines whether or not each number is a valid SIN> The program should stop when it reads the value 999999999.
Hint: Please look at project 1 to find out how to extract digit.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 23:30
What are "open-loop" and "closed-loop" systems
Answers: 1
question
Computers and Technology, 24.06.2019 09:10
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
question
Computers and Technology, 24.06.2019 10:10
Scanning the road can be thought of as a
Answers: 2
question
Computers and Technology, 24.06.2019 22:10
In command prompt, whats a command that will list only .ini files in c: \windows\system32 directory?
Answers: 1
You know the right answer?
1. Python Exercise 4
In the nine-digit Social Insurance Number (SIN) given to each person hav...
Questions
question
Computers and Technology, 23.11.2020 20:10
question
Mathematics, 23.11.2020 20:10
question
Social Studies, 23.11.2020 20:10