0-4) Find out error(s) in following code fragments:1. a=30b=a+print (a+b)
Answers
Answered by
4
Incorrect code
a=30
b=a+print (a+b)
Mistakes that are in the above code
- First error is b is not defined .
- Another error is unsupported operand type its mean the you can not make sum of print you can calculate sum for int , float, decimal values.
- Like in daily life example you can add 2 + 4 but you can not add 2 + apple ( can not add 2 with apple not possible ).
Correct code
a = 30
b = a
print ( a + b )
Similar questions