Vizard 8 » Command Index » Vizard modules » viz » <viz>.ask
8.1

<viz>.ask

This command asks the user a yes or no question

<viz>.ask(  
question  
)  
question
The question you want to ask the user

Remarks

Use this command when you need the user to make a 'Yes' or 'No' decision. This command will halt all events until the user has answered the question. This is generally used during initialization.

Return Value

1 if the answer was 'Yes', 0 if the answer was 'No'

Example

answer = viz.ask('Do you like Vizard?')
if answer:
    print("Let's be friends")
else:
    viz.quit()

See also

<viz>.input
<viz>.choose
<viz>.message