Question: Write a program named divisibility _ checker.py that asks the user for two positive numbers: N ( the maximum number ) and D ( the

Write a program named divisibility_checker.py that asks the user for two positive numbers:
N (the maximum number) and D (the divisor). The program should find all numbers from 1
to N that are divisible by D. For each of those numbers, the program should also check if the
number is even or odd and print that information.
Important:
Use one for loop and one while loop in your solution. You can decide which loop is
on the outside and which one is on the inside.
The program should handle cases where no numbers between 1 and N are divisible by
D.
Example program run 1: (underlined parts indicate what the user enters)
Enter the value of N:10
Enter the value of D: 2
Numbers divisible by 2:
2 is even
4 is even
6 is even
8 is even
10 is even

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 Programming Questions!