Which of the following options can be the output for the following code? import random List=["Delhi","Mumbai","Chennai","Kolkata"] for y in range(4): x = random.randint(1,3) print(List[x],end="#")

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
 Which of the following options can be the output for the following code?
import random
List=["Delhi","Mumbai","Chennai","Kolkata"]
for y in range(4):
       x = random.randint(1,3)
       print(List[x],end="#")

1. Delhi#Mumbai#Chennai#Kolkata#

2. Mumbai#Chennai#Kolkata#Mumbai#

3. Mumbai#Chennai#Kolkata#Mumbai#

4.Mumbai# Mumbai #Chennai # Mumbai


More MCQS Questions and answers

R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!