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);
});
```
You can add a load event listener to a added image and within the handler remove it with a timeout. Generic snippet, maybe it's useful for your code:

```js
const addImage = (i = 1) => {
  let img = document.createElement("img");
  img.src = "https://img.icons8.com/metro/2x/like.png";
  img.addEventListener("load", () => 
    setTimeout(() => document.body.removeChild(img), i*1000));
  // ^add load event/timeout here  
  document.body.appendChild(img);
} 

for (let i=0; i < 5; i += 1) {
  addImage(i);
}

document.addEventListener("click", () => addImage(1));
```

```html
<button>Add image</button>
```