← Back to search

If, Else, & Elif | Raspberry Pi Pico Workshop: Chapter 3.3

Core Electronics 9:24

2,826 views · 79 likes Watch on YouTube ↗

🔗 *The full course* : _https://core-electronics.com.au/courses/raspberry-pi-pico-workshop/_

We now know how to use data and variables to make a *statement* so lets learn how to execute code based on the result of that statement. In this video, we will learn 3 tools, the *if, else and elif* keywords. These functions can be used to *execute* (or not execute code) depending on the statements that we give it, and control the *flow* of our code.

🔧🔨🧰 Hardware featured in this guide:

*Raspberry Pi Pico:*
_https://core-electronics.com.au/catalog/product/view/sku/CE08704_
*The Pico Variants:*
_https://core-electronics.com.au/raspberry-pi/pico.html#category_2118_

💡❓ If you have any questions about this content or want to share a project you're working on head over to our *maker forum:* _http://coreelec.io/forum_

0:00 Intro
0:31 If and Else
2:14 Elif
5:57 Volume Control Demo
8:52 3 Key Takeaways

🌏🦘 *Core Electronics* is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:

• *Raspberry Pi* _https://core-electronics.com.au/raspberry-pi.html_
• *Arduino* _https://core-electronics.com.au/arduino.html_
• *Sparkfun* _https://core-electronics.com.au/brands/sparkfun-australia_
• *Adafruit* _https://core-electronics.com.au/brands/adafruit-australia_
• *Pololu* _https://core-electronics.com.au/brands/pololu-australia_
• *DFRobot* _https://core-electronics.com.au/brands/dfrobot-australia_

The following trademarks are owned by *Core Electronics Pty Ltd:*

"Core Electronics" and the Core Electronics logo
"Makerverse" and the Makerverse logo
"PiicoDev" and the PiicoDev logo
"GlowBit" and the GlowBit logo

Category (YouTube): Education

Playback is via YouTube's official embedded player. Data from YouTube; Exumo is not affiliated with YouTube.