Q. Find out the error(s) in following code fragments:
(i)
temperature = 90
print temperature
(ii)
a = 30
b = a + b
print (a And b)
(iii)
a, b, c = 2, 8, 9
print (a, b, c)
c, b, a = a, b, c
print (a; b; c)
(iv)
X = 24
4 = X
(v)
print ("X="X)
(vi)
else = 21 - 5
Answer =
(i)
temperature = 90
print (temperature)
(ii)
a = 30
b = a + b
print (a, b)
(iii)
a, b, c = 2, 8, 9
print (a, b, c)
c, b, a = a, b, c
print (a, b, c)
(iv)
X = 24
X = 4
(v)
1. "X" is not defined
2. It should be print ("X=",X)
There should be "," .
temperature = 90
print (temperature)
(ii)
a = 30
b = a + b
print (a, b)
(iii)
a, b, c = 2, 8, 9
print (a, b, c)
c, b, a = a, b, c
print (a, b, c)
(iv)
X = 24
X = 4
(v)
1. "X" is not defined
2. It should be print ("X=",X)
There should be "," .
(vi)
"else" Keywords cannot be used as identifiers.
Welcome : )
ReplyDeleteReally helpful thank you so much ❤️
ReplyDeleteWelcome 😊😊😊
DeletePlease explain fifth one.
ReplyDeleteIn statement print ("X="X)
Deletethere should be print ("X=",X)
Thanks sir/ man
ReplyDeleteWelcome : )
Deletethank you for this much information i wanted it to check my answers
ReplyDeleteWelcome : )
DeleteThankyou
ReplyDeleteWelcome : )
DeleteThanks
ReplyDeleteWelcome : )
DeletePlz send all the answers
ReplyDeleteWhere.
DeleteThanks
ReplyDeleteWelcome : )
DeleteSuper helpful thx a lot may good bless u
ReplyDeleteWelcome : )
Deletevery helpful
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )