Keeping Time is giving me a headache

while True:
# If it’s the first 10 seconds, attack.
enemy = hero.findNearestEnemy()
if hero.time < 10:

            if enemy:
              hero.attack(enemy)
    pass
# Else, if it's the first 35 seconds, collect coins.
elif hero.time < 35:
    item = hero.findItems()
    
    pass
# After 35 seconds, attack again!
       else:
     hero.attack(enemy)
    pass

please help
ive been working on it for a while now

while True:
# If it’s the first 10 seconds, attack.
enemy = hero.findNearestEnemy()
if hero.time < 10:

    if enemy:
        hero.attack(enemy)
    pass
# Else, if it's the first 35 seconds, collect coins.
elif hero.time < 35:
    item = hero.findItems()
    
    pass
# After 35 seconds, attack again!
else:
    hero.attack(enemy)
    pass
type or paste code here

the top if has something missing. it should be:

if enemy and hero.time<10:

Please read this to format your code