a=input("Enter a number")
if a%5 = 0:
print("Divisible by 5")
else:
print("Not divisible by 5")
what is the error in this code
Answers
Answered by
2
Answer:
there is nothing error...
Explanation:
plss follow me......
Answered by
12
◆━━━━━━━▣✦▣━━━━━━━━◆
➺The error is in 2nd line i.e,
→correction a%5==0:
⠀
use of == is to check whether the value is 0 or not
use of == is to check whether the value is 0 or notuse of = is to declare that the value is 0
⠀
⠀
a=input("Enter a number")
if a%5 = = 0:
print("Divisible by 5")
else:
print("Not divisible by 5")
◆━━━━━━━▣✦▣━━━━━━━━◆
☆✿╬ʜᴏᴘᴇ ɪᴛ ʜᴇʟᴘs ᴜ╬✿☆
Similar questions