+ 1

check whether the given input number is divisible by 3 or else show a message “Number is not divisible by 3. please assist

Python

11th Nov 2023, 10:46 PM
Vuyile Mangumta
Vuyile Mangumta - avatar
5 ответов
0
num = int(input()) if num % 3 ==0: print("divisible by 3") else: print("Not divisible by 3")
13th Nov 2023, 5:29 PM
Parveen Kumar
Parveen Kumar - avatar
+ 10
Hint: use the % (modulo) operator to check if a number is divisible by another.
12th Nov 2023, 5:20 AM
Tibor Santa
Tibor Santa - avatar
+ 7
Attempts?
12th Nov 2023, 3:30 AM
A͢J
A͢J - avatar
0
<!-- Created by SHYLOCK [#Be Happy ] --> <!DOCTYPE html> <html> <head> <title>Diwali Celebration</title> </head> <body> <div class="circle"> <h1>Happy<br><span>Diwali</span></h1> <div class="light"></div> </div> </body> </html>
13th Nov 2023, 2:32 AM
Mr Raj
Mr Raj - avatar
0
Use if else statement
13th Nov 2023, 4:17 PM
Amisha Kale
Amisha Kale - avatar