Complete the method that takes a boolean value and return a `"Yes"` string for `true`, or a `"No"` string for `false`.

Difficulty: introductory

Starter code:

def bool_to_word(boolean):
	

Solutions:
def bool_to_word(bool):
    return "Yes" if bool else "No"

def bool_to_word(bool):
     if bool:
         return "Yes"
     return "No"

def bool_to_word(bool):
    if bool:
        return 'Yes'
    else:
        return 'No'

def bool_to_word(boolean):
    return "Yes" if boolean else "No"

def bool_to_word(bool):
    return ['No', 'Yes'][bool]

#Complete the method that takes a boolean value and return a 
#"Yes" string for true, or a "No" string for false.

def bool_to_word(boolean):
    if boolean == True:
        return 'Yes'
    elif boolean == False:
        return 'No'

bool_to_word = {True: 'Yes', False: 'No'}.get


def bool_to_word(value):
    return 'Yes' if value else 'No'


bool_to_word = ['No','Yes'].__getitem__

bool_to_word = lambda b: b and "Yes" or "No"

def bool_to_word(bool):
 return bool and "Yes" or "No"

bool_to_word=lambda b:"YNeos"[not b::2]

def bool_to_word(boolean):
    if boolean == True: #condition applied to equate with True 
        return 'Yes'
    else :
        return 'No'
        
bool_to_word (True) # Call the function by passing boolean


def bool_to_word(boolean):
    bool = boolean
    if bool == True:
        return 'Yes'
    elif bool == False:
        return 'No'

bool_to_word = lambda b : ["No", "Yes"][b];

bool_to_word = lambda b: "Yes" if b else "No"

bool_to_word=lambda b:"YNeos"[1-b::2]

bool_to_word = {True: 'Yes', False: 'No'}.__getitem__

def bool_to_word(boolean):
    if (boolean):
      return("Yes")
    elif (not(boolean)):
      return("No")
    else:
      print("You're not real")


def bool_to_word(bool):
    return ('No','Yes')[bool]

def bool_to_word(b):
    return ["No", "Yes"][int(b)]

def bool_to_word(boolean):
    if str(boolean) == 'True':
        hasil = 'Yes'
    else:
        hasil = 'No'
    return hasil

bool_to_word = {0: 'No', 1: 'Yes'}.get

def bool_to_word(boolean):
    if boolean == True:
        var1 = "Yes"
    elif boolean == False:
        var1 = "No"
    return var1

def bool_to_word(boolean):
    return ('No', 'Yes')[boolean]

def bool_to_word(boolean):
    return 'Yes' if boolean==True else 'No'

# Author Kim Villatoro
# Turn a given boolean into a "Yes" or "No" response
# This program takes in a boolean

def bool_to_word(boolean): # Method definition
    if boolean == True:# If boolean is True, it returns "Yes"
        return("Yes")
    elif boolean == False: # If boolean is False, it returns "No"
        return("No")
    else: 
        None # Return None

def bool_to_word(boolean_value):
    if boolean_value:
        return "Yes"
    else:
        return "No"

def bool_to_word(boolean):
    if boolean == True:
        return "Yes"
    elif boolean == False:
        return "No"
    else:
        return "error, neither True nor False"

def bool_to_word(boolean):
    return "Yes" if boolean is True else "No" #too Easy

def bool_to_word(boolean):
    i=boolean
    x=int(i)
    if x==1:
        return ("Yes")
    elif x==0:
        return ("No")
    # TODO


def bool_to_word(boolean):
    if bool(boolean)==1:
        boolean="Yes"
    if bool(boolean)==0:
        boolean="No"
    return boolean 



def bool_to_word(boolean):
    if boolean == True:
        return 'Yes'
    if boolean == False:
        return 'No'
    else:
        print('Not valid.')

def bool_to_word(boolean):
    # TODO
    
    wert = bool(boolean);
    if wert == True:
        return 'Yes';
    else:
        return 'No';

def bool_to_word(boolean):
    #return "Yes" if boolean == True else "No"
    if boolean is True:
        return "Yes"
    else:
        return "No"
    # TODO


def bool_to_word(boolean):
    bool={
       True:"Yes",
       False:"No"
    }
    ans = bool.get(boolean)
    return ans
    



def bool_to_word(boolean):
    # TODO 
    if(bool(boolean)):
        return 'Yes'
    return 'No'

def bool_to_word(boolean):
    # TOD
    if(boolean):
        return 'Yes'
    return 'No'

def bool_to_word(boolean):
    if bool(boolean):
        result = 'Yes'
    else:
        result = 'No'
    return result

def bool_to_word(boolean):
    if boolean:
        return "Yes"
    else:
        return "No"
    
boolean = True

def bool_to_word(boolean):
    # TODO
    if boolean == True:
        return 'Yes'
    elif boolean == False:
        return 'No'
    else:
        return boolean

def bool_to_word(boolean):
    if boolean >= 1 or boolean == str():
        return 'Yes'
    else:
        return 'No'
    
    # TODO


def bool_to_word(statement):
    if statement == True:
        return "Yes"
    elif statement == False:
        return "No"

def bool_to_word(boolean):
    # If boolen is Truen then Yes, Fasle then No
    if boolean:
        return 'Yes'
    else:
        return 'No'

def bool_to_word (boolean):
    """ Возвращает 'Yes' для 'True', 'No' для 'False'"""
    if boolean == True:
        return 'Yes'
    else:
        return 'No'

def bool_to_word(boolean):
    if boolean == True:
        return "Yes"
    elif boolean == False:
        return "No"
    else:
        pass
    
bool_to_word(True)

def bool_to_word(boolean):
    if boolean == True:
        return "Yes"
    elif boolean == False: 
        return "No"
    else: 
        return "No"

def bool_to_word(boolean):
    while boolean == True:
        return 'Yes'
    return 'No'

def bool_to_word(boolean):

    if boolean:
        string ='Yes'
    elif not boolean:
        string = 'No'
    return string

def bool_to_word(boolean):
    # TODO
    if(boolean): 
        print('Yes')
        return 'Yes'
    else: 
        print('No')
        return 'No'
    #print('Yes') if (bool(boolean) == True) else print('No')


def bool_to_word(boolean):
    return "Yes" if boolean >= 1 else "No"

def bool_to_word(boolean):
    
    # Check if boolean statement is True and return "Yes"
    
    if boolean == True:
        state = "Yes"
        return state
    
    # If not return "No"

    state = "No"
    return state

def bool_to_word(boolean):
    # see beauty in the insignificant
    if boolean:
        return "Yes"
    else:
        return "No"

def bool_to_word(boolean):
    if boolean == True:
        y = 'Yes'
        return y
    elif boolean == False:
        n = 'No'
        return n
bool_to_word(True)    

def bool_to_word(boolean):
    
    if boolean == True:  #if statement that executes if condition (boolean == True) is True
        return 'Yes'
    else:                #else statement that executes if condition (boolean == True) is False
        return 'No'

def bool_to_word(b):
    d={True:"Yes",False:"No"}
    return(d.get(b))
bool_to_word(True)

def bool_to_word(boolean):
    dude = ""
    if (boolean == True):
        dude = 'Yes'
    else:
        dude =  'No'
    return dude 

bool_to_word = lambda bool: bool and "Yes" or "No"

def bool_to_word(boolean):
    
  
    if boolean:
        print ('Yes') 
        answer='Yes'

    if not boolean:
        print ('No')
        answer='No'
        
    return answer 


def bool_to_word(boolean):
    if type(boolean) != bool:
        return 'Not a boolean!'
    else:
        return 'Yes' if boolean else 'No'

def bool_to_word(boolean):
    if boolean == True: # if True
        return 'Yes'
    elif boolean == False: # if False
        return 'No'
    # TODO


def bool_to_word(boolean):
    outputtext=""
    if boolean==True:
        outputtext="Yes"
    else:
        outputtext="No"
    return outputtext

def bool_to_word(boolean):
    # return string based on boolean value
    if boolean == True:
        the_string = 'Yes'
        return the_string
    elif boolean == False:
        the_string = 'No'
        return the_string

def bool_to_word(boolean):
    if str(boolean) == 'False': return 'No'
    else: return 'Yes'

def bool_to_word(boolean):
    # TODO
    if boolean is True:
        value = 'Yes'
    elif boolean is False:
        value = 'No'
    return (value)

def bool_to_word(boolean):
    if boolean == (1 == 1):
        return 'Yes'
    else:
        return 'No'

def bool_to_word(boolean: bool) -> str:
    return 'Yes' if boolean == True else 'No'

def bool_to_word(boolean):
    if 1 == boolean:
        return "Yes"
    else:
        return "No"

def bool_to_word(boolean):
    # TODO
    R = 'Yes'
    if boolean == True:
        R = 'Yes'
    else:
        R = 'No'
    return R

def bool_to_word(boolean):
    bool = {True: "Yes", False: "No"}
    return bool[boolean]

def bool_to_word(boolean):
    n = "No"
    if boolean == True:
        n = "Yes"
    return n


def bool_to_word(password):
    if password:
        return 'Yes'
    else:
        return 'No'

def bool_to_word(bolean):
    if bolean:
        return 'Yes'
    else:
        return 'No'

def bool_to_word(boolean):
    int(bool(boolean))
    if boolean == 1:
        return('Yes')
    else:
        return('No')
    # TODO


def bool_to_word(boolean):
    a='Yes'
    b='No'
    if boolean==True:
        return a 
    if boolean==False:
        return b

def bool_to_word(boolean):
        test = 'No'
        if boolean:
            test = 'Yes'
        return test
    


def bool_to_word(boolean):
    # TODO
    sum=""
    if(boolean==True):
        sum="Yes"
    else:
        sum="No"
    return sum

def bool_to_word(boolean: bool) -> str:
    return {True: "Yes", False: "No"}.get(boolean)

def bool_to_word(boolean):
    if int(boolean)==1: return 'Yes'
    elif int(boolean)==0: return 'No'


def bool_to_word(boolean):
    return "Yes" if boolean == True else "No" #return Yes on True else False

def bool_to_word(x):
    if x == True:
        return "Yes"
    elif x != True :
        return "No"

def bool_to_word(boolean):
    # TODO
    if boolean == True:
        return "Yes"
    elif boolean == False:
        return "No"
    
a = False
bool_to_word(a)

def bool_to_word(boolean):
    yess = str(boolean)
    if yess == "True":
        return 'Yes'
    else:
        return 'No'

def bool_to_word(boolean):
    """Function returns a String based on boolean input value: true=YES | false=NO"""
    if boolean:
        return "Yes"
    else:
        return "No"

def bool_to_word(you_mean_it): return 'Yes' if you_mean_it else 'No'

def bool_to_word(boolean):
    if boolean == 0:
        return "No"
    return "Yes"

def bool_to_word(i):
    if(i==True):
        return "Yes"
    elif(i==False):
        return "No"
    # TODO


def bool_to_word(boolean):
    answer = "No"
    
    if boolean:
        answer = "Yes"
    
    return answer

def bool_to_word(boolean):
    return 'Yes' if sum([boolean])==1 else 'No'
    # TODO


def bool_to_word(boolean):
    if not boolean == True:
        return 'No'
    else:
        return 'Yes'

def bool_to_word(boolean):
    return "Yes" if boolean is True or False else "No"

def bool_to_word(boolean):
     return "Yes" if boolean else "No"

bool_to_word(True)

def bool_to_word(boolean):
    if boolean:
        return 'Yes'
    elif not boolean:
        return 'No'
    else:
        return 'None'

def bool_to_word(boolean):
    if boolean is True:
        res = "Yes"
    else:
        res = "No"
    return res

def bool_to_word(boolean):
    # TODO
    if boolean==0 or False:
        return"No"
    else:
        return "Yes"

def bool_to_word(boolean):
    if type(boolean) == type(True):
        if boolean:
            return 'Yes'
        else:
            return 'No'
    else:
        raise TypeError("boolean was not of type boolean but of type {}".format(type(boolean)))

def bool_to_word(boolean):
    val=boolean
    if(val==1):
        return 'Yes'
    else:
        return 'No'

def bool_to_word(boolean):
    return "Yes" if boolean == True else "No" if boolean == False else 0

def bool_to_word(boolean):
    # TODO
    if boolean:
        return('Yes')
    if boolean == False:
        return('No')
bool_to_word(True)
bool_to_word(False)