1.

Rewrite the following code after removing the syntactical errors (if any). Underline each correction.def chksum:x= input ("Enter a number")if (x%2 = 0):for i range (2 * x):print iloop else :print "#"

Answer»

def chksum():

x= input("Enter a number")

if (x%2 == 0):

for i in range(2*x):

print i

else:

print "#"



Discussion

No Comment Found

Related InterviewSolutions