Fun with Python - Solving Project Euler Problem 1

Publié le: 09 mai 2021
sur la chaîne: Network Playroom
2,344
25

In this video, we'll solve Problem 1 from Project Euler. I'll show you two solutions using a for loop and a while loop.

See: https://projecteuler.net/problem=1

0:00 Introduction
0:40 Disclaimer: not an expert programmer!
1:29 Resources
1:56 Windows Subsystem for Linux (WSL)
2:23 Python interpreter
2:56 Project Euler
5:55 Problem 1
6:35 Programming logic to solve the problem
7:27 How to test if a number is a multiple of 3 or 5
9:13 if statement
10:12 for loop
11:17 Add number to the sum
13:06 Demonstrating the += assignment operator
14:49 Putting the code together
16:19 Boolean logic (True or False)
17:37 Running the code on WSL
19:25 Alternative solution: while loop
20:20 Explaining the code for alternative solution
21:47 Logic problem with while loop
22:25 Indentation is important!
22:59 Experimenting with indentation
25:35 Fixing the code
26:42 Ending

GitHub: https://github.com/dotonebit/Project-...

Thank you for watching!

LIKE 👍🏼 and SUBSCRIBE ❤️

Follow on Twitter:   / dotonebit  


Sur cette page du site, vous pouvez voir la vidéo en ligne Fun with Python - Solving Project Euler Problem 1 durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Network Playroom 09 mai 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,344 fois et il a aimé 25 téléspectateurs. Bon visionnage!