Question: Write a program in Python. First, repeatedly checks whether an integer has 1 0 positive divisors or more. A number d is said to be

Write a program in Python. First, repeatedly checks whether an integer has 10 positive divisors or more. A number d is
said to be a divisor of n if there is no remainder after dividing n by d. The repetition should stop as soon as q or Q is
entered.
Second, reads the integer n from the keyboard. Finds and prints: a) all positive two digit integers up to and including n
whose digit sum squared is equal to the integer in question; b) and all positive three digit integers up to and including n
whose digit sum cubed is equal to the integer in question. The digit sum of an integer n is found by taking each digit of
n and adding them all together.
Input ?(())
First, the input for part one will be provided: Zero or more integers will appear in the input, each on its own line,
followed by a line containing only a q or a Q , which indicates the repetition should stop. Then, the input for part two
follows: One line containing the integer n . You may assume that each integer in the input will be between 10 and 999.
Output
For each integer input in the first part, the program outputs yes if the integer has 10 or more positive divisors, otherwise
it outputs no. Then the program outputs the integers found in part two in ascending order, each on its own line. The
program must handle input and output in the correct order. In other words, it cannot read the next integer before
producing the output for the previous one.
Read
Write
Write a program in Python. First, repeatedly

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!