Q. Consider the following code:


import random

print (100 + random.randint(5, 10), end = ' ')
print (100 + random.randint(5, 10), end = ' ')
print (100 + random.randint(5, 10), end = ' ')
print (100 + random.randint(5, 10))

Find the suggested output options (i) to (iv). Also, write the least value and highest value that can be generated.


(i) 102 105 104 105
(ii) 110 103 104 105
(iii) 105 107 105 110
(iv) 110 105 105 110

Answer =

Option (iii) & (iv) will generate only.

Highest value is 110
Least value is 105

1 Comments

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

  1. How the least and highest values are counted pls tell fast

    ReplyDelete

Post a Comment

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

Previous Post Next Post