#!/usr/bin/python
# A tutorialból loptam

def ask_ok(prompt, retries=4, complaint='Yes or no, please!'):
         while 1:
             ok = raw_input(prompt)
             if ok in ('y', 'ye', 'yes'): return 1
             if ok in ('n', 'no', 'nop', 'nope'): return 0
             retries = retries - 1
             print complaint



#Az előbbi függvény tesztjei
print "Első"
if ask_ok('Are you female? '):
 sex='female'
 a='husband'
else:
 sex='male'
 a='wife'

if ask_ok('Have you got a '+a+' ? '):
 hazastars=raw_input('What\'s her name? ')


