I have a infinite loop need to exit the script if condition meets and print my expected output
Code:
import random
stud=[0,0]
studnme = ['a','b']
while (stud[0] !=50 or stud[1] !=50):
if flag = 0:
lucky_draw = random.randint(1,6)
stud_marks = stud[0] + lucky_draw
stud[0] = stud[0] + lucky_draw
flag=1
else:
lucky_draw = random.randint(1,6)
stud_marks = stud[1] + lucky_draw
stud[0] = stud[1] + lucky_draw
flag=0
Output :
Student 'a' You have reached : 50
Student 'b' You have reached : 34
Need to print who as highest points