Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
/ 7-segment-words Public archive

Longest Word You Can Write With Seven-Segment Displays

Notifications You must be signed in to change notification settings

loucyx/7-segment-words

Repository files navigation

Longest Word You Can Write With Seven-Segment Displays

Based on this video. This repo has 2 versions of the script, one with the first block of allowed letters in the video, and another with the more restrictive one. The output is a top 5 of the longest words, but I took the extra step of showing them like it was a 7-segment display. I also included the bonus round which is:

Bonus question: what's the longest word you can spell just by turning a calculator upside-down?

Run v1

npm run v1

  ╻ ╻   ┏━  ╻ ╻ ╻                 ╻ ╻   ┏━┓ ╻ ╻ ┏━  ┏━┓ ╻ ╻ ╻   ╻       ╻   ┏━  ╻ ╻ ╻               ┏━  ╻   ╻ ╻ ┏━┓ ┏━┓ ┏━
┏━┫ ┃   ┃   ┣━┫ ┃   ┏━┓ ┏━  ┏━┓ ┏━┫ ┃   ┣━┛ ┣━┫ ┣━  ┃ ┃ ┗━┫ ┃   ┣━  ┏━  ┃   ┃   ┣━┫ ┃   ┏━┓ ┏━  ┏━┓ ┣━  ┣━  ┣━┫ ┣━┫ ┃ ┃ ┣━
┗━┛ ╹   ┗━  ╹ ╹ ┗━  ┗━┛ ╹   ┗━┛ ┗━┛ ╹   ╹   ╹ ╹ ┗━  ╹ ╹  ━┛ ┗━  ┗━  ╹   ╹   ┗━  ╹ ╹ ┗━  ┗━┛ ╹   ┗━┛ ┗━  ┗━  ╹ ╹ ╹ ╹ ╹ ╹ ┗━

┏━┓ ┏━  ┏━  ╻ ╻   ╻     ╻   ┏━┓ ╻   ┏━      ┏━┓ ┏━┓ ╻   ╻       ┏━┓ ┏━┓ ╻   ╻   ┏━  ╻   ╻   ┏━
┣━┛ ┗━┓ ┣━  ┃ ┃ ┏━┫ ┏━┓ ┃   ┃ ┃ ┣━  ┣━  ┏━  ┃ ┃ ┣━┫ ┣━  ┃   ┏━┓ ┃ ┃ ┣━┫ ┃   ┃   ┗━┓ ┣━  ┃   ┃
╹    ━┛ ┗━  ┗━┛ ┗━┛ ┗━┛ ╹   ╹ ╹ ┗━  ┗━  ╹   ╹ ╹ ╹ ╹ ┗━  ╹   ┗━┛ ╹ ╹ ╹ ╹ ┗━  ╹    ━┛ ┗━  ╹   ┗━

┏━  ╻ ╻ ╻               ╻       ╻   ┏━  ╻   ╻ ╻             ┏━  ╻   ╻ ╻ ╻ ╻ ╻   ┏━  ┏━┓ ┏━
┃   ┣━┫ ┃   ┏━┓ ┏━  ┏━┓ ┣━  ┏━  ┃   ┣━  ┃   ┃ ┃ ┏━┓ ┏━  ┏━┓ ┣━  ┣━  ┣━┫ ┗━┫ ┃   ┣━  ┃ ┃ ┣━
┗━  ╹ ╹ ┗━  ┗━┛ ╹   ┗━┛ ┗━  ╹   ╹   ┃   ┗━  ┗━┛ ┗━┛ ╹   ┗━┛ ┗━  ┗━  ╹ ╹  ━┛ ┗━  ┗━  ╹ ╹ ┗━

┏━┓ ╻ ╻ ┏━  ┏━┓     ╻   ┏━  ╻ ╻ ╻   ┏━┓ ╻ ╻     ┏━┓ ┏━  ┏━┓ ╻ ╻ ╻   ╻ ╻ ┏━┓ ╻   ┏━  ╻   ┏━┓
┣━┛ ┣━┫ ┣━  ┃ ┃ ┏━┓ ┃   ┗━┓ ┃ ┃ ┃   ┣━┛ ┣━┫ ┏━┓ ┃ ┃ ┣━  ┣━┛ ┣━┫ ┣━  ┣━┫ ┣━┫ ┃   ┣━  ┃   ┃ ┃
╹   ╹ ╹ ┗━  ╹ ╹ ┗━┛ ┗━   ━┛ ┗━┛ ┗━  ╹   ╹ ╹ ┗━┛ ╹ ╹ ┗━  ╹   ╹ ╹ ┗━  ╹ ╹ ╹ ╹ ┗━  ┗━  ╹   ╹ ╹

┏━┓     ╻   ╻ ╻ ╻   ┏━  ╻       ┏━┓ ┏━  ╻   ╻ ╻             ┏━  ╻   ╻ ╻ ╻ ╻ ╻   ┏━  ┏━┓ ┏━
┣━┛ ┏━┓ ┃   ┗━┫ ┣━  ┣━  ┣━  ┏━  ┣━┫ ┣━  ┃   ┃ ┃ ┏━┓ ┏━  ┏━┓ ┣━  ┣━  ┣━┫ ┗━┫ ┃   ┣━  ┃ ┃ ┣━
╹   ┗━┛ ┗━   ━┛ ┗━  ┗━  ┗━  ╹   ╹ ╹ ┃   ┗━  ┗━┛ ┗━┛ ╹   ┗━┛ ┗━  ┗━  ╹ ╹  ━┛ ┗━  ┗━  ╹ ╹ ┗━

Run v2

npm run v2

┏━  ╻ ╻ ┏━┓ ┏━      ╻       ┏━┓ ┏━┓ ┏━  ┏━  ┏━  ┏━┓   ╻ ┏━  ┏━┓ ╻   ┏━┓ ┏━  ┏━  ┏━
┗━┓ ┃ ┃ ┣━┛ ┣━  ┏━  ┣━  ┏━  ┣━┫ ┃ ┃ ┗━┓ ┃   ┣━  ┃ ┃ ┏━┫ ┣━  ┃ ┃ ┣━  ┃ ┃ ┣━  ┗━┓ ┗━┓
 ━┛ ┗━┛ ╹   ┗━  ╹   ┗━  ╹   ╹ ╹ ╹ ╹  ━┛ ┗━  ┗━  ╹ ╹ ┗━┛ ┗━  ╹ ╹ ┗━  ╹ ╹ ┗━   ━┛  ━┛

┏━  ╻ ╻ ┏━┓ ┏━      ┏━  ╻ ╻ ┏━┓ ┏━      ┏━┓ ╻   ╻ ╻ ┏━┓   ╻ ┏━┓ ┏━┓ ╻   ╻   ╻ ╻
┗━┓ ┃ ┃ ┣━┛ ┣━  ┏━  ┗━┓ ┃ ┃ ┣━┛ ┣━  ┏━  ┣━┫ ┣━┓ ┃ ┃ ┃ ┃ ┏━┫ ┣━┫ ┃ ┃ ┣━  ┃   ┗━┫
 ━┛ ┗━┛ ╹   ┗━  ╹    ━┛ ┗━┛ ╹   ┗━  ╹   ╹ ╹ ┗━┛ ┗━┛ ╹ ╹ ┗━┛ ╹ ╹ ╹ ╹ ┗━  ┗━   ━┛

┏━  ╻ ╻ ┏━┓ ┏━      ┏━  ╻ ╻ ┏━┓ ┏━      ┏━┓ ╻   ╻ ╻ ┏━┓   ╻ ┏━┓ ┏━┓ ┏━  ┏━
┗━┓ ┃ ┃ ┣━┛ ┣━  ┏━  ┗━┓ ┃ ┃ ┣━┛ ┣━  ┏━  ┣━┫ ┣━┓ ┃ ┃ ┃ ┃ ┏━┫ ┣━┫ ┃ ┃ ┃   ┣━
 ━┛ ┗━┛ ╹   ┗━  ╹    ━┛ ┗━┛ ╹   ┗━  ╹   ╹ ╹ ┗━┛ ┗━┛ ╹ ╹ ┗━┛ ╹ ╹ ╹ ╹ ┗━  ┗━

┏━  ╻ ╻ ┏━┓ ┏━      ┏━┓   ╻ ┏━┓ ┏━┓ ╻   ┏━┓ ╻   ╻   ┏━  ┏━┓ ┏━  ┏━  ┏━
┗━┓ ┃ ┃ ┣━┛ ┣━  ┏━  ┣━┫ ┏━┫ ┣━┫ ┣━┛ ┣━  ┣━┫ ┣━┓ ┃   ┣━  ┃ ┃ ┣━  ┗━┓ ┗━┓
 ━┛ ┗━┛ ╹   ┗━  ╹   ╹ ╹ ┗━┛ ╹ ╹ ╹   ┗━  ╹ ╹ ┗━┛ ┗━  ┗━  ╹ ╹ ┗━   ━┛  ━┛

╻ ╻ ╻   ╻       ┏━┓ ╻       ┏━┓ ┏━  ╻ ╻ ╻ ╻ ┏━  ┏━  ┏━┓ ╻ ╻ ┏━┓ ╻   ╻ ╻
┃ ┃ ┃   ┣━  ┏━  ┣━┫ ┣━┓ ┏━  ┣━┫ ┃   ┣━┫ ┗━┫ ┃   ┣━  ┣━┛ ┣━┫ ┣━┫ ┃   ┗━┫
┗━┛ ┗━  ┗━  ╹   ╹ ╹ ┗━┛ ╹   ╹ ╹ ┗━  ╹ ╹  ━┛ ┗━  ┗━  ╹   ╹ ╹ ╹ ╹ ┗━   ━┛

Run bonus

npm run bonus

┏━┓ ╻   ┏━┓ ╻   ╻   ┏━┓ ╻   ┏━┓ ┏━  ╻   ┏━  ┏━
┣━┫ ┃   ┣━┫ ┃   ┃   ┃ ┃ ┃   ┃ ┃ ┣━┓ ┃   ┣━  ┗━┓
┗━┛ ╹   ┗━┛ ┗━  ╹   ┗━┛ ┗━  ┗━┛ ┗━┛ ╹   ┗━   ━┛

┏━  ╻   ┏━┓ ┏━  ┏━  ┏━┓ ╻   ┏━┓ ┏━  ╻   ┏━  ┏━
┣━┓ ┃   ┃ ┃ ┗━┓ ┗━┓ ┃ ┃ ┃   ┃ ┃ ┣━┓ ┃   ┣━  ┗━┓
┗━┛ ┗━  ┗━┛  ━┛  ━┛ ┗━┛ ┗━  ┗━┛ ┗━┛ ╹   ┗━   ━┛

╻   ╻   ╻   ╻   ┏━┓ ╻   ╻   ╻   ╻   ┏━  ┏━
┣━┓ ┃   ┃   ┃   ┣━┫ ┃   ┃   ┃   ┃   ┣━  ┗━┓
╹ ╹ ╹   ┗━  ┗━  ┗━┛ ╹   ┗━  ┗━  ╹   ┗━   ━┛

╻   ┏━  ┏━┓ ┏━  ╻   ┏━┓ ┏━  ┏━  ┏━  ┏━
┃   ┗━┓ ┃ ┃ ┣━┓ ┃   ┃ ┃ ┗━┓ ┗━┓ ┣━  ┗━┓
╹    ━┛ ┗━┛ ┗━┛ ┗━  ┗━┛  ━┛  ━┛ ┗━   ━┛

╻   ┏━┓ ┏━┓ ╻   ┏━┓ ╻   ╻   ╻   ┏━  ┏━ 
┃   ┃ ┃ ┣━┫ ┃   ┃ ┃ ┃   ┃   ┃   ┣━  ┗━┓
┗━  ┗━┛ ┗━┛ ┗━  ┗━┛ ┗━  ┗━  ╹   ┗━   ━┛

About

Longest Word You Can Write With Seven-Segment Displays

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published