My For loop won't iterate through a list

前端 未结 2 1505
一生所求
一生所求 2021-01-29 12:01

I have to determine if all the numbers in a list are prime numbers and then return a boolean \"True\" or \"False\" statement depending on the outcome. I made some conditional st

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-29 12:15

    You should see the problem the other way around.

    If you you find a number which is not prime you should return False, and after your loop end you should return True.

提交回复
热议问题