Computer Science, asked by igmarvelxdc, 6 days ago

Read the given program and answer the questions below: #Begins X1=5 X2=X1+10 X2=X2/3 print(X1) print(X2) A1="ANNUAL-XI-2020" A1[9]="@" print(A1) B1=[3,4,5,6] B1[2]=B1[2]+5 print(B1) #Ends

(i) List the variables used in the above program and also mention their data-type
(ii) Would the above program be executed successfully? If yes, write the output of the program, otherwise state the error and explain why the error had been occurred.​

Answers

Answered by piyushsolanki07
1

Read the given program and answer the questions below: #Begins X1=5 X2=X1+10 X2=X2/3 print(X1) print(X2) A1="ANNUAL-XI-2020" A1[9]="@" print(A1) B1=[3,4,5,6] B1[2]=B1[2]+5 print(B1) #Ends

(i) List the variables used in the above program and also mention their data-type

(ii) Would the above program be executed successfully? If yes, write the output of the program, otherwise state the error and explain why the error had been occurred.

Similar questions