What are the possible outcome(s) executed from the following code? Also specify the maximum and
minimum values that can be assigned to the variable NUM.
import random
NAV=["LEFT","FRONT","RIGHT","BACK"]
NAVG=""
for J in range(NUM,1,-1):
NAVG=NAVG+NAV[J]
print(NAVG)
(i) BACKRIGHT (ii) BACKRIGHTFRONT (iii) BACK (iv)LEFTFRONTRIGHT
Answers
Answered by
4
Answer:
(i) BACKRIGHT
For variable NUM :
Max value - 3
Min value - 0
Similar questions