Python Beginner tutorial series using project Euler #7 - 10001st Prime

preview_player
Показать описание
A pretty brute force method for solving problem 7, hopefully this makes a lot of sense and should be simpler to follow than other methods I could think of. Let me know if you have any questions below.

Please don't forget to like if you liked the video and subscribe if you want to see more, thanks!

Рекомендации по теме
Комментарии
Автор

Hello Luke. Can I ask more about "if all(x % prime for prime in list_of_primes):"?
when is this condition becoming true?
Does this become true when "x mod prime" becomes 0? How can we know this fact?
How about the initial input when x equals 2 and list_of_primes is an empty list by default.
Thank you for your video though

shinkevin
Автор

all(x % prime for prime in list_of_primes):
please explain it in for loop??

nazrul