Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 243 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Python 3, (削除) 197 196 192 (削除ここまで)192190 bytes

from random import*;c=choice;r=range(1,7);u=c(r);l=c(list(set(r){*r}-{u,u^7}));print(r''' ________
 /\ \
 / \%4d \
{ %d }-------}
 \ /%4d /
 \/_______/'''%(u,l,3*u*l*(u*u-l*l)%7))

Test it on ideone Try it online!

Right-handed (switch to a lefty by swapping u*u with l*l on the last line)

Bound to be beat - but let's get the dice rolling sigh - especially since all my attempts to golf the ASCII except going raw and using old-school formatting all failed to save bytes;

  • any further golfing tips for a n00b gladly appreciated.

Python 3, (削除) 197 196 (削除ここまで)192 bytes

from random import*;c=choice;r=range(1,7);u=c(r);l=c(list(set(r)-{u,u^7}));print(r''' ________
 /\ \
 / \%4d \
{ %d }-------}
 \ /%4d /
 \/_______/'''%(u,l,3*u*l*(u*u-l*l)%7))

Test it on ideone

Right-handed (switch to a lefty by swapping u*u with l*l on the last line)

Bound to be beat - but let's get the dice rolling sigh - especially since all my attempts to golf the ASCII except going raw and using old-school formatting all failed to save bytes;

  • any further golfing tips for a n00b gladly appreciated.

Python 3, (削除) 197 196 192 (削除ここまで)190 bytes

from random import*;c=choice;r=range(1,7);u=c(r);l=c(list({*r}-{u,u^7}));print(r''' ________
 /\ \
 / \%4d \
{ %d }-------}
 \ /%4d /
 \/_______/'''%(u,l,3*u*l*(u*u-l*l)%7))

Try it online!

Right-handed (switch to a lefty by swapping u*u with l*l on the last line)

Bound to be beat - but let's get the dice rolling sigh - especially since all my attempts to golf the ASCII except going raw and using old-school formatting all failed to save bytes;

  • any further golfing tips for a n00b gladly appreciated.
edited body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Python 3, (削除) 197 196 (削除ここまで)196192 bytes

from random import*;c=choice;r=range(1,7);u=c(r);l=c(list(set(r)-{u,u^7}));print(r''' ________
 /\ \
 / \  %d\%4d \
{ %d }-------}
 \ / %d%4d /
 \/_______/'''%(u,l,3*u*l*(u*u-l*l)%7))

Test it on ideone

Right-handed (switch to a lefty by swapping u*u with l*l on the last line)

Bound to be beat - but let's get the dice rolling sigh - especially since all my attempts to golf the ASCII except going raw and using old-school formatting all failed to save bytes;

  • any further golfing tips for a n00b gladly appreciated.

Python 3, (削除) 197 (削除ここまで)196 bytes

from random import*;c=choice;r=range(1,7);u=c(r);l=c(list(set(r)-{u,u^7}));print(r''' ________
 /\ \
 / \  %d \
{ %d }-------}
 \ / %d /
 \/_______/'''%(u,l,3*u*l*(u*u-l*l)%7))

Test it on ideone

Right-handed (switch to a lefty by swapping u*u with l*l on the last line)

Bound to be beat - but let's get the dice rolling sigh - especially since all my attempts to golf the ASCII except going raw and using old-school formatting all failed to save bytes;

  • any further golfing tips for a n00b gladly appreciated.

Python 3, (削除) 197 196 (削除ここまで)192 bytes

from random import*;c=choice;r=range(1,7);u=c(r);l=c(list(set(r)-{u,u^7}));print(r''' ________
 /\ \
 / \%4d \
{ %d }-------}
 \ /%4d /
 \/_______/'''%(u,l,3*u*l*(u*u-l*l)%7))

Test it on ideone

Right-handed (switch to a lefty by swapping u*u with l*l on the last line)

Bound to be beat - but let's get the dice rolling sigh - especially since all my attempts to golf the ASCII except going raw and using old-school formatting all failed to save bytes;

  • any further golfing tips for a n00b gladly appreciated.
added 9 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Python 3, 197(削除) 197 (削除ここまで)196 bytes

importfrom random;c=random.choice;r=rangerandom import*;c=choice;r=range(1,7);u=c(r);l=c(list(set(r)-{u,u^7}));print(r''' ________
 /\ \
 / \ %d \
{ %d }-------}
 \ / %d /
 \/_______/'''%(u,l,3*u*l*(u*u-l*l)%7))

Test it on ideone

Right-handed (switch to a lefty by swapping u*u with l*l on the last line)

Bound to be beat - but let's get the dice rolling sigh - especially since all my attempts to golf the ASCII except going raw and using old-school formatting all failed to save bytes;

  • any further golfing tips for a n00b gladly appreciated.

Python 3, 197 bytes

import random;c=random.choice;r=range(1,7);u=c(r);l=c(list(set(r)-{u,u^7}));print(r''' ________
 /\ \
 / \ %d \
{ %d }-------}
 \ / %d /
 \/_______/'''%(u,l,3*u*l*(u*u-l*l)%7))

Test it on ideone

Right-handed (switch to a lefty by swapping u*u with l*l on the last line)

Bound to be beat - but let's get the dice rolling sigh - especially since all my attempts to golf the ASCII except going raw and using old-school formatting all failed to save bytes;

  • any further golfing tips for a n00b gladly appreciated.

Python 3, (削除) 197 (削除ここまで)196 bytes

from random import*;c=choice;r=range(1,7);u=c(r);l=c(list(set(r)-{u,u^7}));print(r''' ________
 /\ \
 / \ %d \
{ %d }-------}
 \ / %d /
 \/_______/'''%(u,l,3*u*l*(u*u-l*l)%7))

Test it on ideone

Right-handed (switch to a lefty by swapping u*u with l*l on the last line)

Bound to be beat - but let's get the dice rolling sigh - especially since all my attempts to golf the ASCII except going raw and using old-school formatting all failed to save bytes;

  • any further golfing tips for a n00b gladly appreciated.
added 78 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293
Loading
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293
Loading

AltStyle によって変換されたページ (->オリジナル) /