The issue with your program is that the name variable is never updated inside the loop. After the initial input, the while loop keeps running indefinitely because the name variable is still holding its initial value.
To fix this, you need to prompt the user to enter their name again inside the loop. Here's the corrected code:
while name != "John":
print("Please type your name.")
name = input() # Update the value of 'name' within the loop
print("Thank you!")