Skip to content

Instantly share code, notes, and snippets.

@Napear
Last active August 10, 2018 06:43
Show Gist options
  • Save Napear/6d46a9793d0a616d9c1cf9ecbbf5b24d to your computer and use it in GitHub Desktop.
Save Napear/6d46a9793d0a616d9c1cf9ecbbf5b24d to your computer and use it in GitHub Desktop.
BookClub Homework #1
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