ASSIGNMENT - 3
NAME: NELLORE SAI NIKHIL
REG. NO: 21BCE8845
Q1) Write a program in python to check whether a four
digit number is divisible by3. The input, i.e. 4-digit
number, should be user-defined. For example, 3420
is divisible by 3 because the sum of digits (3 + 4 + 2
+0 = 9) is divisible by 3.
CODE:
OUTPUT – 1:
OUTPUT – 2:
OUTPUT – 3:
OUTPUT – 4:
OUTPUT – 5: