Last active
August 10, 2018 06:43
-
-
Save Napear/6d46a9793d0a616d9c1cf9ecbbf5b24d to your computer and use it in GitHub Desktop.
BookClub Homework #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prompt_user_input(message, defualt_value) | |
print(message) | |
input = readline() | |
value_entered =(input.len > 0) && (input.len < 128) | |
return value_entered ? input : defualt_value | |
end | |
function prompt_user_cont() | |
return contains(==, lowercase(prompt_user_input("We still doin' dis? [Y/n]: ", "y")), 'y') | |
end | |
username = prompt_user_input("What yo' name is? ", "NotSoCleverPunk") | |
password = prompt_user_input("And yo' password? ", "StupidBlankPassword") | |
while(prompt_user_cont()) end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment