Computer Science, asked by GautamDodiya, 11 months ago

0-4) Find out error(s) in following code fragments:
1. a=30
b=a+
print (a+b)​

Answers

Answered by lovingheart
3

The first line deals with assigning a value of 30 with to the variable ‘a’. The second line is trying to perform operation on the variable a and assign the value of the operation to the variable ‘b’ and finally to print the value of a+b.

The first line has no problem and it gets executed.

The third line print statement is perfect where it adds the value of a+b and then perform the print operation to display the value of the operation a + b.

The second line has a syntax error which is trying to add the value of variable ‘a’ with another which is not specified.

Similar questions