Q. Predict the output of following code:

 

num = 20.5

z = 3

result = 2 + z * z ** 3 + num // z

print (result)

 

(a) Firstly, determine the answer without running the code and write.

(b) Now type the above code in script mode and test-run the program. Write below the result given by Python.

 

Answer =

 

(i)

It is based on your thinking that how you execute the above program in your mind. So do you self.

 

(ii)

Output:-

 

89.0

>>> 

 

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post