You won't find anyone here to write it for you. If you want help with problem areas then you can post your questions but you have to show proof of effort first. Please read this thread for suggestions on how to post meaningful questions.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: