Question: # replace the print(0) statement below with the following logic: # # Using if-elif-else type logic change the code such that if your unique 5
# replace the print(0) statement below with the following logic: # # Using if-elif-else type logic change the code such that if your unique 5 digit # number is divisible by ALL of its digits greater than 0, it should print red; # otherwise, it should print blue if it is divisible by any of its digits # greater than 0, otherwise it should print green # # As an example, if your number is 10302, the logic should print red # (10302 is divisible by the non-zero digits 1,2, and 3) # if your number is 50215, the logic should print blue # (50215 is divisible by the non-zero digits 5 and 1, but not by 2) # if your number is 77708, the logic should print green # (77708 is not divisible by any of the non-zero digits 7 or 8)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
