InterviewSolution
Saved Bookmarks
| 1. |
Write a Python program to print every integer between 1 and n divisible by m. Also report whether the number that is divisible by m is even or odd. |
|
Answer» tion:n = int(input("ENTER the n number = "))m = int(input("enter m as divisor = "))for i in range(1,n): if i % m == 0 : if i % 2 == 0 : PRINT(i,"is divisible m and this is even number ") ELSE : print(i,"is divisible m and this is odd number ") |
|