Computer Science, asked by sheethalsriramp7ty04, 4 months ago

write a python program to enter any number and check it is divisible by 7 or not.

Answers

Answered by atrs7391
22

\textsf{\Large{\textbf{\underline{Program:}}}}

\texttt{\large{n = int(}}i\texttt{\large{nput("Enter a Number: "))}}

\texttt{\large{if n }} % \texttt{\large{ 7 == 0:}}

   \texttt{\large{    print(n, "is divisible by 7. ")}}

\texttt{\large{else:}}

   \texttt{\large{    print(n, "is not divisible by 7. ")}}

Answered by Anonymous
9

Program:

n = float(input("Enter a Number: "))

if n % 7 == 0:

print(n, "is divisible by 7.")

else:

print(n, "is not divisible by 7.")

Similar questions