Created
January 26, 2021 10:11
-
-
Save vkolev/7647189cf5bf7ada05efc3ceb8608351 to your computer and use it in GitHub Desktop.
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
import nimpy | |
proc yes(question: string): bool {.exportpy.} = | |
echo question, "(y/n)" | |
while true: | |
case readLine(stdin) | |
of "y", "Y", "yes", "Yes": return true | |
of "n", "N", "no", "No": return false | |
else: echo "Please be clear yes or no" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment