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.
a = [{a, b} for a in range(1, 7) for b in range(1, 7) if sum({a, b}) == 6]
b = [{a, b} for a in range(1, 7) for b in range(1, 7)]
print(len(a)/len(b) * 30/36)
lol
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: More Dice
You are viewing a single comment's thread. Return to all comments →
a = [{a, b} for a in range(1, 7) for b in range(1, 7) if sum({a, b}) == 6] b = [{a, b} for a in range(1, 7) for b in range(1, 7)] print(len(a)/len(b) * 30/36)
lol