So, like the title says, today you are going to guess my password (sort of). You need to make a big long list of every possible password I might be using on my 4 digit online vault.
Specifications:
- It could contain any 26 letters of the alphabet in UPPER CASE.
- It could contain any numbers 0-9.
- So, basically, each digit has 36 different possibilities.
- There are four digits.
- Repeat characters are allowed! (Hint: Sample space is 1,679,616 or 36^4)
Program Requirements/Rules:
- Program must output all possible answers to a text file or to the console, line by line. (One answer per line)
- You may not make use of any premade tools for this (Idk if any exist, but just in case)
- It must generate all 36^4 possible answers
Remember, this is a Code-golf. So shortest answer in bytes wins. Please use the standard title format of ##Language Name, Byte Size
. Even if there is a winner, feel free to post your answer. (It's always fun to see the different solutions in different languages).
Edit: Not a duplicate of sugested, mines has different context, and different paremeters. (I require numbers, duplicate characters, and only UPPERCASE)
.say for [X~] (0..35)».base(36)xx 4
, answer to the other question issay 'a'.../password/
( orprint "$_ " for 'a'.../password/
if you want it to start printing immediately. ) There is no easy way to answer either question starting out with the answer for the other one. I say remove all mention of the word password, and try to re-open. \$\endgroup\$ – Brad Gilbert b2gills Dec 1 '15 at 18:09