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
In questa pagina del sito puoi guardare il video online Fun with Python - Solving Project Euler Problem 1 della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Network Playroom 09 maggio 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,344 volte e gli è piaciuto 25 spettatori. Buona visione!