Question: Write a program called ' testc.py' that asks the user to enter a series of integer numbers, one per line, finishing with the word 'DONE'.
Write a program called ' testc.py' that asks the user to enter a series of integer numbers, one per line, finishing with the word 'DONE'. The program will count and sum up the number of adjacent pairs of values where the first number is a factor of the second number in the sequence. Say, for example, the user enters the following series of numbers:
3,2,2,1,4,4,6. There are three pairs of adjacent values that meet the criterion:
(2,2),(1,4)and
(4,4). Their sum is 17 . HINT: Given two integers
aand
b,ais a factor of
bif
b&
a==0. Sample 10 (The input from the user is shown in bold font - do not program this):Sample 10 (The input from the user is shown in bold font - do not program this):

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
