#!/usr/bin/env python3


import random


def get_random_word():

    words = [
        'mammoth',
        'stay',
        'improve',
        'zealous',
        'day',
        'foregoing',
        'hilarious',
        'oil',
        'doubtful',
        'brush',
        'impolite',
        'birthday']

    return random.choice(words)


def check_word(tries):

    word = get_random_word()

    while tries > 0:
        guess = input("Bitte rate das Wort: ")

        if guess == word:
            print("Richtig geraten")
            break

        print("Falsch geraten. Du Depp!")
        tries -= 1
        print("Versuche übrig: {0}".format(tries))


check_word(tries=5)