Fun with Python - Solving Project Euler Problem 1

Опубликовано: 09 Май 2021
на канале: 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  


На этой странице сайта вы можете посмотреть видео онлайн Fun with Python - Solving Project Euler Problem 1 длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Network Playroom 09 Май 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,344 раз и оно понравилось 25 зрителям. Приятного просмотра!