Question: `If the input is more than a single charecter then the program should ask the user if he wants to try again.But my code fails and the input line keeps popping up.

```
def is_vowel(char):
    vowels = ('a', 'e', 'i', 'o', 'u')
    if char not in vowels:
        return False
    return True

def main():
    again="y"
    while again.lower() == "y":
        char = input("Enter a charecter:")
        if len(char) > 1:
            #print("enter only one charecter")
            again = input("enter a charecter again: (y/n):")
            break
        else:
            is_vowel(char)
if __name__ == "__main__":
    main()`

```

Answer: 
The problem is you're cancelling your interval timer when there aren't any images, so if the user doesn't create an image within a second (and within a second after that, etc.), the timer will get cancelled and no further images will be removed.

I wouldn't use an interval timer for this, I'd use a single timer (`setTimeout`) you create specifically for the added image:

```js
document.addEventListener("click",function(event){
    let img= document.createElement("img");
    img.style.position="absolute";
    img.style.left=(event.clientX-32)+"px";
    img.style.top=(event.clientY-32)+"px";
    img.src="1.png";
    document.body.appendChild(img);
    // Remove it after one second
    setTimeout(() => {
        img.remove();
    }, 1000);
});
```
If the intent is to remove the images 1 second after each other you should set the `timer` inside the "click" callback. This way you can add the interval if it is not yet set.

If the intent is to display each image a maximum of 1 second this is not the answer you're looking for.

```js
let imgList = [];
let timer;
document.addEventListener("click",function(event){
    let img = document.createElement("img");
    img.style.position = "absolute";
    img.style.left = (event.clientX - 32) + "px";
    img.style.top = (event.clientY - 32) + "px";
    img.src = "https://placehold.it/64x64.png";
    document.body.appendChild(img);

    imgList.push({
        img:img,
        opacity:1,
        scale:1,
        frame:0
    });

    if (!timer) {
      timer = setInterval(draw, 1000);
    }
});

function draw(){
    if (imgList.length < 1) {
        clearInterval(timer);
        timer = null;
    }
    else {
        imgList[0].img.remove();
        imgList.splice(0, 1);
    }
}
```