Published On May 11, 2022
It's the Monty Hall Problem! In JavaScript! With p5.js! Yes, you really double your chances of winning by switching doors. I hope to convince you of this in this video! https://editor.p5js.org/codingtrain/s...
p5.js Web Editor Sketches:
š¹ļø Monty Hall: https://editor.p5js.org/codingtrain/s...
š¹ļø Monty Hall (variable speed and doors): https://editor.p5js.org/codingtrain/s...
GitHub Repo and Demo:
š» Repo: https://github.com/CodingTrain/Monty-...
š» Demo: https://codingtrain.github.io/Monty-H...
š„ Previous video: Ā Ā Ā ā¢Ā CodingĀ ChallengeĀ 169:Ā PiĀ inĀ theĀ SkyĀ GameĀ Ā
š„ All videos: Ā Ā Ā ā¢Ā CodingĀ ChallengesĀ Ā
Links discussed in this video:
š Game Show Problem, Ask Marilyn, Parade Magazine 1990: https://web.archive.org/web/201301211...
š Document Object Model (DOM): https://developer.mozilla.org/en-US/d...
š CSS Basics: https://developer.mozilla.org/en-US/d...
Other videos mentioned in this video:
š„ The Basics of CSS - p5.js Tutorial: Ā Ā Ā ā¢Ā 8.7:Ā TheĀ BasicsĀ ofĀ CSSĀ -Ā p5.jsĀ TutorialĀ Ā
š„ 8.11 - Callbacks on Multiple DOM Elements - p5.js Tutorial Ā Ā Ā ā¢Ā 8.11:Ā CallbacksĀ onĀ MultipleĀ DOMĀ Eleme...Ā Ā
š„ Local Storage in JavaScript with p5.js Ā Ā Ā ā¢Ā LocalĀ StorageĀ inĀ JavaScriptĀ withĀ p5.jsĀ Ā
Timestamps:
0:00 What is the Monty Hall Problem?
1:50 Solution for Monty Hall Problem!
6:55 Starting the Code
8:53 Centering a DIV
10:22 Callback Events
15:40 Refactoring into Functions
23:11 Adding Stats
27:04 Playing the game!
28:21 Bayes Theorem
31:45 Goodbye!
š Website: http://thecodingtrain.com/
š¾ Share Your Creation! https://thecodingtrain.com/Guides/com...
š© Suggest Topics: https://github.com/CodingTrain/Rainbo...
š” GitHub: https://github.com/CodingTrain
š¬ Discord: Ā Ā /Ā discordĀ Ā
š Membership: http://youtube.com/thecodingtrain/join
š Store: https://standard.tv/codingtrain
š Books: https://www.amazon.com/shop/thecoding...
šļø Twitter: Ā Ā /Ā thecodingtrainĀ Ā
šø Instagram: Ā Ā /Ā the.coding.trainĀ Ā
š„ Coding Challenges: Ā Ā Ā ā¢Ā CodingĀ ChallengesĀ Ā
š„ Intro to Programming: Ā Ā Ā ā¢Ā StartĀ learningĀ here!Ā Ā
š p5.js: https://p5js.org
š p5.js Web Editor: https://editor.p5js.org/
š Processing: https://processing.org
š Code of Conduct: https://github.com/CodingTrain/Code-o...
Editing by Mathieu Blanchette
Animations by Jason Heglund
Images licensed by Getty Images
Music from Epidemic Sound
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/websit...