Skip to main content
deleted 1616 characters in body
Source Link
Peter
  • 1k
  • 3
  • 3

Generate an emoticonGenerate an emoticon

Your task is to generate an emoji of three characters, the first character being one eye, the second the mouth, and the third another eye. Each eye is a random one of these characters: $'*+-;O^`ox~, and the mouth is a random one of these: ,-._coux.

Each eye and the mouth must be on the same general level. These eyes: '*;^` and these mouths: -coux are "upper-level", while these eyes: $+-Oox~ and these mouths: ,._ are "lower-level". Any emoji has a 50 % chance of using only upper-level eyes and mouth, and a 50 % chance of using only lower-level ones.

Additionally, the eyes should usually not be different. The chance of the eyes using the same symbol must be somewhere between 50 % and 67 %.

Rules

  • The submission must be a function or a full program.
  • The submission must either print the emoji to the screen with optional trailing and/or preceding whitespace, or returning the emoji as a string.
  • The emoji should have a 50 % chance of being upper-level and a 50 % chance of being lower-level.
  • All eyes and mouths of the same level must have the same chance of occuring.
  • The eyes should be the same 50-67 % of the time.
  • Standard loopholes apply.
  • This is a , so the shortest answer in bytes wins!

Examples:


-_- // All symbols are lower-level: legal
~o.~ // Two eyes on the right side: illegal
^^ // No mouth - illegal
^_^ // The mouth is lower-level but the eyes are not: illegal
^-* // All symbols are upper-level: legal

Enjoy!

Generate an emoticon

Your task is to generate an emoji of three characters, the first character being one eye, the second the mouth, and the third another eye. Each eye is a random one of these characters: $'*+-;O^`ox~, and the mouth is a random one of these: ,-._coux.

Each eye and the mouth must be on the same general level. These eyes: '*;^` and these mouths: -coux are "upper-level", while these eyes: $+-Oox~ and these mouths: ,._ are "lower-level". Any emoji has a 50 % chance of using only upper-level eyes and mouth, and a 50 % chance of using only lower-level ones.

Additionally, the eyes should usually not be different. The chance of the eyes using the same symbol must be somewhere between 50 % and 67 %.

Rules

  • The submission must be a function or a full program.
  • The submission must either print the emoji to the screen with optional trailing and/or preceding whitespace, or returning the emoji as a string.
  • The emoji should have a 50 % chance of being upper-level and a 50 % chance of being lower-level.
  • All eyes and mouths of the same level must have the same chance of occuring.
  • The eyes should be the same 50-67 % of the time.
  • Standard loopholes apply.
  • This is a , so the shortest answer in bytes wins!

Examples:


-_- // All symbols are lower-level: legal
~o.~ // Two eyes on the right side: illegal
^^ // No mouth - illegal
^_^ // The mouth is lower-level but the eyes are not: illegal
^-* // All symbols are upper-level: legal

Enjoy!

Source Link
Peter
  • 1k
  • 3
  • 3

Generate an emoticon

Your task is to generate an emoji of three characters, the first character being one eye, the second the mouth, and the third another eye. Each eye is a random one of these characters: $'*+-;O^`ox~, and the mouth is a random one of these: ,-._coux.

Each eye and the mouth must be on the same general level. These eyes: '*;^` and these mouths: -coux are "upper-level", while these eyes: $+-Oox~ and these mouths: ,._ are "lower-level". Any emoji has a 50 % chance of using only upper-level eyes and mouth, and a 50 % chance of using only lower-level ones.

Additionally, the eyes should usually not be different. The chance of the eyes using the same symbol must be somewhere between 50 % and 67 %.

Rules

  • The submission must be a function or a full program.
  • The submission must either print the emoji to the screen with optional trailing and/or preceding whitespace, or returning the emoji as a string.
  • The emoji should have a 50 % chance of being upper-level and a 50 % chance of being lower-level.
  • All eyes and mouths of the same level must have the same chance of occuring.
  • The eyes should be the same 50-67 % of the time.
  • Standard loopholes apply.
  • This is a , so the shortest answer in bytes wins!

Examples:


-_- // All symbols are lower-level: legal
~o.~ // Two eyes on the right side: illegal
^^ // No mouth - illegal
^_^ // The mouth is lower-level but the eyes are not: illegal
^-* // All symbols are upper-level: legal

Enjoy!