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>>> ")
if color == "":
print("No skipping!")
print(check(input("Enter Name Here>>> ")))
print("What is your dream car?")
car = input("fav_car>>> ")
if car == "":
print("No skipping!")
print(check(input("Enter Name Here>>> ")))
print("What team are you on?")
team = input("team_name>>> ")
if team == "":
print("No skipping!")
print(check(input("Enter Name Here>>> ")))
print("Who is your best friend?")
crush = input("best_friend>>> ")
if crush == "":
print("No skipping!")
print(check(input("Enter Name Here>>> ")))
print("What color is your shirt?")
shirt = input("shirt_color>>> ")
if shirt == "":
print("No skipping!")
print(check(input("Enter Name Here>>> ")))
print("You got clout?")
clout = input("clout_level>>> ")
if clout == "":
print("No skipping!")
print(check(input("Enter Name Here>>> ")))
print("Do you think you passed the test?")
passed = input("passed?>>> ")
if passed == "":
print("No skipping!")
print(check(input("Enter Name Here>>> ")))
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() > 1:
print("passed")
else:
print("failed")
print("Congrats on your result!")
sleep(100)
check(input("Enter Name Here>>> "))