i'm new in progamming and starting with few basics tips. So my problem is: i'm trying to run a code that ask user a name and print it on screen, its run ok. So i'm trying to do something special now adding to code a part that ask the user how many times the name will be printed on screen, but when i do that it start a infinite loop and won't stop until i close the progam. 

Here its the code

```
function metodoDois()
  print("Write a name: ")
  name = io.read();
  print("Write how many times that it will be printed on screen: ")
  quantidade = io.read()

  k = 0;
  while name do
    k = k+1;
    io.write("\n", name, " ", k)
    if k == quantidade then
      name = not name;
    end
  end
end

metodoDois()

```