Fun with Python - Solving Project Euler Problem 1

Veröffentlicht am: 09 Mai 2021
auf dem Kanal: 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  


Auf dieser Seite können Sie das Online-Video Fun with Python - Solving Project Euler Problem 1 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Network Playroom 09 Mai 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,344 Mal angesehen und es wurde von 25 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!