Computer Science
Find out the error(s) in following code fragment:
a = 30
b=a+b
print (a And b)
Python Funda
29 Likes
Answer
There are two errors in this code fragment:
- In the statement b=a+b variable b is undefined.
- In the statement print (a And b), And should be written as and.
Answered By
14 Likes
Related Questions
How will Python evaluate the following expression ?
15.0 / 4 + (8 + 3.0)
Find out the error(s) in following code fragment:
temperature = 90 print temperature
Find out the error(s) in following code fragment:
a, b, c = 2, 8, 9 print (a, b, c) c, b, a = a, b, c print (a ; b ; c)
Find out the error(s) in following code fragment:
X = 24 4 = X