Sort
vbvb
if __name__ == '__main__':
list=["yellow","green","red"]
import random
i=1
while i<3:
b=0
if i==1:
for x in range(5):
a= random.choice (list)
if a=="yellow":
b=b+10
elif a=="green":
b=b+5
else:
b=b+15
elif i==2:
for x in range(5):
a = random.choice (list)
if a == "yellow":
b = b + 10
elif a=="green":
b = b + 5
else:
b = b + 15
elif i==3:
for x in range(5):
a = random .choice (list)
if a == "yellow":
b = b + 10
elif a=="green":
b = b + 5
else:
b = b + 15
if b>=40:
i=i+1