Back to Browse

Conditional Statements (if, elif, else) in Python - Beginner Python Tutorial #2

55.2K views
Mar 1, 2018
31:41

Second video in my python tutorial series. In this video we go over everything related to conditional statements in python. If you have any questions feel free to comment down below :) Python Command Cheat sheet: https://www.cheatography.com/paul-benn/cheat-sheets/python-3-beginner-s-reference/ Link to previous video: https://www.youtube.com/watch?v=XM0CtrJYM2A&t=108s Don't forget to SUBSCRIBE to not miss any future tutorials! ------------------------- Challenge problem I asked at the end of the video: Write a set of conditional statements to find whether or not a number is a “special” number Special numbers are defined as numbers less than 100 or greater than or equal to 300 that are perfectly divisible by 3, 7, or both # Print out “Divisble by both” if special number divisible by both 3 & 7 # Print out “Divisble by 3” if special number divisible by 3, but not 7 # Print out “Divisible by 7” if special number divisible by 7, but not 3 #Print out “Not a special number” otherwise ------------------------- PYTHON TUTORIAL SERIES: Why Learn Python? +Setup: https://youtu.be/RJL6Y761TNE 1. Math & Variables: https://youtu.be/XM0CtrJYM2A 2. Conditional Statements (if, elif, else): https://youtu.be/vsVGPcfxEiA 3. Functions: https://youtu.be/5U95tRdYySA 4. Lists & Tuples: https://youtu.be/_zFI6ytHHdY 5. For Loops & While Loops: https://youtu.be/WPF5M_Ic6Fc Learn to Program a game: https://youtu.be/-8n91btt5d8 ------------------------- Follow me on social media! Instagram | https://www.instagram.com/keithgalli/ Twitter | https://twitter.com/keithgalli ------------------------- If you are curious to learn how I make my tutorials, check out this video: https://youtu.be/LEO4igyXbLs ⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=keithgalli&utm_content=description-only *I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.

Download

1 formats

Video Formats

360pmp444.4 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Conditional Statements (if, elif, else) in Python - Beginner Python Tutorial #2 | NatokHD