Computer Science, asked by bishnuboy10285pe4dzb, 5 months ago

Find the error in the following code and write the corrected code after underlining the errors of

the incorrect code:


n=int(intake(“Enter a number”))

if n%10==0

print(‘The number is divisible by 10”)

else:

print[‘Number is not divisible by 10’]​

Answers

Answered by imshanayakhosla
0

Answer:

if n%10===0

Explanation:

there should be a triple equal to ===

print[‘Number is not divisible by 10’] here there shuld be double quotes I thinkn

Answered by Anonymous
8

 {\boxed{\underline{\orange{\bf\tt{Incorrect~code:} } }}}

n=int(intake(“Enter a number”))

if n%10==0

print(‘The number is divisible by 10”)

else:

print[‘Number is not divisible by 10’]

 {\boxed{\underline{\purple{\bf\tt{Correct~code :} } }}}

n=int(input(“Enter a number”))

if n%10==0:

 \: \: \: \: print('The number is divisible by 10')

else:

 \: \: \: \: print(‘Number is not divisible by 10’)

Similar questions