Project Euler Problem 1 Python

preview_player
Показать описание
How to solve Project Euler Problem 1 using Python. In this video, I'll show you how to find multiples of 3 or 5 in Python.

Project Euler (named after Leonhard Euler) is a website dedicated to a series of computational problems intended to be solved with computer programs.

In this video series, I will try to solve Project Euler problems with python as much as possible. You can consider the solutions of these questions as Python algorithm exercises.

Did you find this video helpful? Consider subscribing for solution, tips, tricks, and tutorials.

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

Please more video's more problem to let us see the best soulation. Great video's indeed thank you

baherwahby
Автор

Thank you, very clear. Thank you for sharing!. One question, what could be the best way to display the tally of the addition, lets say : multiple of 3, subtotal, multiple of 5, thanks for your reply (I guess I 'm confused with the variables....I 'm visually impaired)...

rauldempaire
Автор

I'm very new to coding.
This video's solution is the simplified version of what I came up with, I guess I did needless extra steps.
Here are other variants I saw people do, and I wanna know someones opinion on them. Which if these 3 ways is the best and why?

Ok so second variant is:

A = list(range(0, 1000, 3)
B = list(range(0, 1000, 5)
C = list(range(0, 1000, 15)
print(sum(A) + sum(B) - sum(C))

And third variant is:
print(sum(i for i in range(1000) if i % 3 == 0 or i % 5 == 0))

gi-go