Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment