We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
# Enter your code here. Read input from STDIN. Print output to STDOUTfromfractionsimportFractiontable=['r','r']+['b'foriinrange(8)]table2=list(table)print(table)count=0total=0foriintable:table2=list(table)table2.remove(i)forjintable2:table3=list(table)table3.remove(i)table3.remove(j)forkintable3:draw=i+j+k#print(draw)ifany([mindrawformin['rrb','brr']]):print(draw,[mindrawformin['rrb','brr']])count+=1total+=1print(Fraction(count,total))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 3: Basic Probability Puzzles #5
You are viewing a single comment's thread. Return to all comments →
can someone say what is wrong in this: