There are several mistakes in your code, both in terms of syntax and logic. Before you go further, I'd suggest you go back to reading basic Python tutorials, until you at least get a good understanding of the language's syntax.
Meanwhile, here's a functional version of your code, heavily commented so that you can follow through it and see what's going on.
# first we declare our valid username & password
username = "chicken"
password = "monkeys"
# we print our welcome message
print("Welcome to example")
# Then we ask our initial question
input_question = input("Do you have an example account (Please type yes or no)?")
# We only care if input was yes, otherwise
# program will terminate
if input_question == "yes":
# then we initiate an infinite loop
while True:
# in each iteration, we prompt user to input
# a username and password
input_username = input("please input username")
input_password = input("Please input your password")
# and for each iteration, we check the input
if input_username == username:
if input_password == password:
# if we reach this point, user has entered good
# credentials, we print our success message and
# break the loop
print("access granted")
break
# if we reach this point, credentials didn't match
# we print error message and let our loop reinitiate
print("access denied")