Personal quiz with input validation The object of the code is to prompt the user with a quiz and collect the g's, y's, 0's, and 1's and if there is more than one then the user passes (else, they fail).  I am a beginner and would like to know if there is a more efficient direction for this code to go in.

from time import sleep
print(pic1)


def check(name):
    if name.lower() == "brandon":
        print("Welcome home master")
    else:
        print("Let's find some data")
        sleep(0.5)
        print("What is your favorite color?")
        color = input("fav_color&gt;&gt;&gt; ")
        if color == "":
            print("No skipping!")
            print(check(input("Enter Name Here&gt;&gt;&gt; ")))
        print("What is your dream car?")
        car = input("fav_car&gt;&gt;&gt; ")
        if car == "":
            print("No skipping!")
            print(check(input("Enter Name Here&gt;&gt;&gt; ")))
        print("What team are you on?")
        team = input("team_name&gt;&gt;&gt; ")
        if team == "":
            print("No skipping!")
            print(check(input("Enter Name Here&gt;&gt;&gt; ")))
        print("Who is your best friend?")
        crush = input("best_friend&gt;&gt;&gt; ")
        if crush == "":
            print("No skipping!")
            print(check(input("Enter Name Here&gt;&gt;&gt; ")))
        print("What color is your shirt?")
        shirt = input("shirt_color&gt;&gt;&gt; ")
        if shirt == "":
            print("No skipping!")
            print(check(input("Enter Name Here&gt;&gt;&gt; ")))
        print("You got clout?")
        clout = input("clout_level&gt;&gt;&gt; ")
        if clout == "":
            print("No skipping!")
            print(check(input("Enter Name Here&gt;&gt;&gt; ")))
        print("Do you think you passed the test?")
        passed = input("passed?&gt;&gt;&gt; ")
        if passed == "":
            print("No skipping!")
            print(check(input("Enter Name Here&gt;&gt;&gt; ")))
        print("Calculating...")
        sleep(2.5)

        def add():
            color_counted = color.count("g")
            car_counted = car.count("g")
            team_counted = team.count("g")
            crush_counted = crush.count("g")
            shirt_counted = shirt.count("g")
            clout_counted = clout.count("y")
            clout_counted2 = clout.count("1")
            clout_counted3 = clout.count("0")
            passed_counted = passed.count("y")
            total = color_counted + car_counted + team_counted + clout_counted3 + passed_counted
            total = crush_counted + shirt_counted + clout_counted + clout_counted2
            return total
        if add() &gt; 1:
            print("passed")
        else:
            print("failed")
        print("Congrats on your result!")
        sleep(100)


check(input("Enter Name Here&gt;&gt;&gt; "))
Welcome to CodeReview! This isn't great code, but that doesn't mean that this is a bad question. I think that you've come to the right place.

Recursion

    if color == "":
        print("No skipping!")
        print(check(input("Enter Name Here&gt;&gt;&gt; ")))


This uses recursion when it shouldn't. In other words, check is calling itself needlessly, and if the user tries to "skip" enough times, you'll get a stack overflow. Instead of doing this, just loop until you have valid input.

Fake delays

    print("Calculating...")
    sleep(2.5)


Few things bother me more than when a user interface lies to me. This output suggests that it takes 2.5 seconds for a calculation to be done, but that simply isn't so. Don't lie to your users - just show the results.

sleep(100) is actively harmful - the user needs to Ctrl+C to kill the program; otherwise it sits there preventing the user from getting their shell terminal back. This should just be deleted.

Don't repeat yourself

There are many places in the program that are expressed in a repetitive manner, especially user input (the "no skipping" mechanism), the call to count, and the additions to get total. I suggest the following:

def input_without_skip(prompt: str) -&gt; str:
    while True:
        result = input(f'{prompt}&gt;&gt;&gt;')
        if result:
            return result
        print('No skipping!')


def is_master() -&gt; bool:
    return input_without_skip('Enter Name Here') == 'Hercules'


def get_counts():
    for question, prompt, chars in (
        (     'What is your favorite color?',   'fav_color', 'g'),
        (          'What is your dream car?',     'fav_car', 'g'),
        (            'What team are you on?',   'team_name', 'g'),
        (         'Who is your best friend?', 'best_friend', 'g'),
        (        'What color is your shirt?', 'shirt_color', 'g'),
        (                   'You got clout?', 'clout_level', 'y10'),
        ('Do you think you passed the test?',     'passed?', 'y')
    ):
        print(question)
        answer = input_without_skip(prompt)
        yield sum(answer.count(c) for c in chars)


def main():
    if is_master():
        print('Welcome home, master.')
        return

    print("Let's find some data!")
    total = sum(get_counts())

    if total &gt; 1:
        print("passed")
    else:
        print("failed")
    print("Congrats on your result!")


if __name__ == '__main__':
    main()