how can i format the while loop syntax?
<p>I'm a beginner python learner and I wrote the following code asking a user to enter an account pin:</p>

<pre><code>while True:
    print ('Please enter your pin.')
    pin = input()
    if pin =='2356':
        print('Access granted')
        break
</code></pre>

<p>Now... if I only want to allow the user to enter an incorrect pin 5 times before 'freezing their account', how might I do that? Am I even using the right type of loop?</p>

<p>Thanks!</p>