0% found this document useful (0 votes)
28 views

Python Practice Problems - 1

This document is a student assignment containing 5 outputs for a Python program. The program checks if a 4-digit user-input number is divisible by 3 by summing the digits and checking if the sum is divisible by 3. The document contains the student's name, registration number, and the question prompting the program, but does not show the code or outputs.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Python Practice Problems - 1

This document is a student assignment containing 5 outputs for a Python program. The program checks if a 4-digit user-input number is divisible by 3 by summing the digits and checking if the sum is divisible by 3. The document contains the student's name, registration number, and the question prompting the program, but does not show the code or outputs.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

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:

You might also like