What I use to learn (the BEST IT training): ntck.co/itprotv (30% off FOREVER) *affiliate link In this episode of Learn Python RIGHT NOW, NetworkChuck teaches how to let good Ben in using Nested Ifs and Elif statements! FREE Python Lab: ntck.co/pythonep5 Support the course: ntck.co/pythonrightnow 🔥🔥Join the NetworkChuck membership: ntck.co/Premium **Sponsored by ITProTV 0:00 ⏩ Intro 2:50 ⏩ Figure out if Ben is EVIL 3:23 ⏩ STEP ONE: Ask Ben if he is evil 4:22 ⏩ NEW CONCEPT: Nested IFs!! 5:48 ⏩ Nest the code under the Second If statement 6:38 ⏩ No nice Greeting for Nice Ben?! 7:18 ⏩ Make Ben feel special!! 9:50 ⏩ Robot Barista is doing a great job but changes are needed 11:03 ⏩ Messy fix for the menu 12:46 ⏩ NEW CONCEPT: Else If (ELIF) 14:58 ⏩ Let’s add an else 16:25 ⏩ CHALLENGE: Whipped Cream?? 17:04 ⏩ Outro
Thanks, Chuck for continuing this series. I've recently gotten into Linux/Virtualisation/Python because of your channel. I love ALL of it, learning something new each day.
Thank you for the new episode! So far, you're the only fun, interesting and entertaining person I've seen to teach people Python and even Linux, making it look so easy!
I'm taking python programming in college right now and your series is ALMOST on track with our class... I wish I had this video before my test yesterday because I got points off on the elif questions 😵💫 if this was posted on Tuesday I might have had a higher grade on my midterm!!!!
@@conm9891 It seems you misunderstood and misinterpreted the timeline of events in the original comment. Your reply criticizes the grammar of the original commenter, but the comment itself acknowledges the presence of grammar mistakes, so this criticism is redundant.
I’ve gone through this whole series in a night and I can’t be thankful enough for 1) the raspberri pi I bagged on your birthday lol and the amount of knowledge and how easy you explain it to someone who has 0 idea about anything like this! I finished the challenge and felt so good, I will forever thank you for this and your other videos Chuck! I hope you read this and acknowledge how crucial you are to an entire generation and the ones to come!
Amazing so far. I went from not knowing code yesterday to writing my own Barista in tandem with this. Even have a replit account now for it. Going to attempt to build a game with only what was learned from 1-5. Honestly almost had it but could not figure out "elif" on my own. Keep up the great work! You are honestly one of the greatest teachers I have had the pleasure to learn from.
Oh my god your teaching style is really effective. Your 3 (4) classes are the only experience I e had with coding and I was able to solve the “allow evil Ben into the shop” problem all by myself. Thank you so much for this!!!
Hey @NetworkChuck. I'm 42 years old and have been wanting to learn programming my whole life, but never got around to it. Thanks for making this so accessable. I've been really enjoying your videos and how you make it fun and simple. Keep doing what you do man, because it's so good. God bless brother.
Use "==" to compare instead of "=". What you're doing in your example, will always return the thanks, since you're reassigning the value to the variable chunk.
Hey Chuck, this python playlist is truly the best I've ever seen. I literally opened a new file and started coding from your videos when I was nervous to even start by doing it. Your a great teacher and I learned a lot from your videos, excited to watch more and learn more.
Since you call the exit() function when Ben is evil, you can remove the else function and just print out the text once (instead of twice, like you have now) That makes the code much cleaner
I'm not sure what you've got against green tea but as a complete python noob this is one of the most easiest to follow explanations of if, elif, else I've watched!
I have my 12 yo following along with your exercises. He's getting there. We sit down and watch your videos, then he goes and tries it out, I make myself a coffee, and I can help him when he's stuck. It's an evening routine and gets him away from the video game world for a bit to learn something useful. It's awesome.
Chuck, all of your outro music is dope! I would love a link to a Spotify playlist if you have one available. I’ve also listened to your RUclips live music video a few times.
Great video! I think you skipped over one important thing regarding the "elif": The main difference between sequential if's and if..elif...elif block is the fact that 'if' statements will always be evaluated, but if...elif block will be exited at the first successful evaluation and further elif's will be omitted.
Love your channel Network Chuck. It was “duh” on my part because I also have a text book. Your videos are helpful. And thanks for the tip @kristaps bergfelds.
I’ve been a dog trainer for the last 6-7 years. I was a financial analyst who wrote a lot of VBA. I’m shocked and excited to see how similar python and VBA are so far. I was afraid I was in for a complete relearn, it it looks like I can write code like I was used to and just figure out the little quirks that are different (Colon after the if statement, etc. ). I’m also going through your ccna videos series. I’m looking into getting into cyber security. And trying to get the basics down before I dive in. Thanks so much.
Hello Chuck! First of all....You did what my previous teacher couldn't do for a pretty high salary. I'm glad I've found your channel in time, maybe i'm not totally lost after all. In my school they used every single class for torturing us mentally then somehow force the most likely raw boring staff into our head without logic or better understanding. I can't thank you enough for your precious teaching that fixes my ruined education.
Love your way of teaching. It's like Blue Clues but for adults. It helps me understand what you're teaching and you're also entertaining me while learning which makes the learning experience better.
Heeey teacher am from Ethiopia i just wnna say that i like u and u and u r best teacher ...legend. davidB too I hope will see u and learn more And i know u like Ethiopian natural coffee we like u too .... great teacher
I've started college for programming and had little to none knowledge of this and the professors make it seem more complicated then it is and your showing it's easier then I thought it would be. Thanks for this series
Got it! I set a variable for whipped = input("Do you want whipped cream? ). Then I used an if statement for Yes and elif for no! You're a great teacher! Thanks.
💯Looking forward to the next episode. I absolutley love your teaching style and I cannot wait to learn more with you. Please do keep doing the videos (if you can!) 🙏
This whole series so far has been amazing! You're a great teacher, keep up the great work! I'm mainly commenting for the RUclips Al Gore rhythm because you deserve more views. Lol
I loved this series, at the end i wanted to test something so i went ahead and added a if statement if they don't order something on the menu then quantity and total becomes 0 and the code prints goodbye!, i love this !!
Bruh can you do a video on subnetting? Got my first job out of uni as a IT consultant and I would like an easy video around subnetting as you are the number 1 IT youtuber out there
lol i paused it and did it all in couple min ( the different prices i mean) so many errors forgot in so many places took me like 20 mins but was worth it to see it work thx man ur the only one who i found who actually makes coding fun and u even understand a humans brain like bro u actually know whats fun and wats cringe thx again keep up the good work
if name == "NetworkChuck": evil_status = input("Are you evil? ") if evil_status == "Yes": print("Retaliating for all the Bens out there, you are not welcome here " + name + ", but thank you for the lessons!") exit() else: print("I knew you were a good guy, NetworkChuck. Thank you for coming in and being one of the good guys! ")
Dude your class is so amazing. Ive learned a bunch from your videos and that whipped cream challenge thing had me for a loop till I figured it out. Keep doing what your doing brother.
I learned all of parts 1,2,3,4 and 5 in one day,hope you will post more of these,they are very entertaining and so much usefull.Now I can do basics in python and I learned that all in one day,thanks to you
@@AliAhmad-su1hw u need to define the prize.That means write a line in the python code that says : price = number.U can change the number to a price of your choice
Where did you go to school Chuck? I’m specializing in cybersecurity, and it feels like as my courses progress, your videos are nearly side-by-side to mine 😂
In high school (80's), my nickname was "Nerd" and I took that as a badge of honor, and I now crown you as a Nerd (Never Ending Radical Dude), yes I made that up. Thank you.
thanks mr chuck: if i can try this. if order == "tea" : cream = input("Do you went whiphed cream? ") if cream == "yes" : price = 11 elif cream == "no" : price = 5
i have learned so much from u so far. and for the whip cream challange. i did that. and on my list i have boba. so i did the same thing but it just asks what flavour boba you want. please. and seriously please. never. stop.these episodes. they are amazing i learn so much
You should do a video about F-Strings. They let you add code into the string using curly braces (these -> {}{}{}{}). For example, print('You have $' + money +'.') would become print(f'You have ${money}.')
Oh my science, you're amazing! Just starting to learn Python and you make it sooo easy and so clear and so fun... And yes, I'm always drinking coffee with you! OK diving into ep 6! Much love from Israel 🖤
Thank you so much for supplying everyone with this series! I was able to complete the whipped cream challenge on my first try. I am very glad that I am actually learning!!
I took a much more rudimentary approach to structuring this one and figured I might share in case someone finds it helpful! Basically, the idea I had is that checking the name and printing the welcome message are 2 fundamentally unique tasks. So it starts like: name = input("What is your name? ") if name == "Ben": evil = input("Are you evil? [y/n] ") else: evil = "n" This initial portion takes the name, and if it's ben, sets evil to the answer of the question. If they're not ben, it just sets evil to no. Then it continues: if evil == n: print("Hello " + name + ", thank you so much for coming in today!") else: print("You're not welcome here! Get out!!") exit() This part then checks the evil state from the first process, if they're not evil it welcomes them and will continue through the script. However, if they admit to being evil, they get kicked out. Obviously the whole point of this video was to show that nesting if statements is a thing, and it's helpful. I thought sharing this simplified example might be nice though as doing things in a process like this is nice to avoid situations like needing 2 different welcome messages (unless you want a special message for non-evil Bens, in which case this method is worse). Just one more tool in the belt.
What I use to learn (the BEST IT training): ntck.co/itprotv (30% off FOREVER) *affiliate link
In this episode of Learn Python RIGHT NOW, NetworkChuck teaches how to let good Ben in using Nested Ifs and Elif statements!
FREE Python Lab: ntck.co/pythonep5
Support the course: ntck.co/pythonrightnow
🔥🔥Join the NetworkChuck membership: ntck.co/Premium
**Sponsored by ITProTV
0:00 ⏩ Intro
2:50 ⏩ Figure out if Ben is EVIL
3:23 ⏩ STEP ONE: Ask Ben if he is evil
4:22 ⏩ NEW CONCEPT: Nested IFs!!
5:48 ⏩ Nest the code under the Second If statement
6:38 ⏩ No nice Greeting for Nice Ben?!
7:18 ⏩ Make Ben feel special!!
9:50 ⏩ Robot Barista is doing a great job but changes are needed
11:03 ⏩ Messy fix for the menu
12:46 ⏩ NEW CONCEPT: Else If (ELIF)
14:58 ⏩ Let’s add an else
16:25 ⏩ CHALLENGE: Whipped Cream??
17:04 ⏩ Outro
Hello Chuck!
Hii
Hululu
Guess I'm second one xd
Chuck can you do more cyber security videos in the future
Thanks, Chuck for continuing this series. I've recently gotten into Linux/Virtualisation/Python because of your channel. I love ALL of it, learning something new each day.
Same
Where di you guys learning?
@@ISCARI0T 🤡
Me too. I threw my tv out of the window since I inside chuck RUclips Chanel AND NO if or else for me since then (-:
@@ISCARI0T LMFAO
Hey Chuck please never stop the series i started learning it because of you man
To the people this was recommended to 10 years in the future NetworkChuck was the most consistent youtuber back in 2022
It is now two days before 2024
His teaching method is great
nah bro definitely hacks Da Hood
2024 I'm still here
I used to be a fan but after this masterpiece i'm a whole air conditioner
No
nice video
@@caam0000 how did you find out
@@tomscott8820 😂
🤣🤣🤣🤣🤣 that's awesome
Thank you for the new episode! So far, you're the only fun, interesting and entertaining person I've seen to teach people Python and even Linux, making it look so easy!
Thank you 😊
Your are not wrong about that
@@NetworkChuck, you're welcome!
That's the best user name I have seen this month
@@alexpenna 😂😂
I wish my professors were like you. I swear I learn more from watching your videos than sitting for hours in a class.
Thanks for the great content.
good teachers are everything
I'm taking python programming in college right now and your series is ALMOST on track with our class... I wish I had this video before my test yesterday because I got points off on the elif questions 😵💫 if this was posted on Tuesday I might have had a higher grade on my midterm!!!!
why are you making him feel guilty? lol j/k
Huh? You first mention a test, then midterm. If you didnt know you have a midterm then you have some bigger issues then your grammar.
I watched all these video's today i am hooked
@@conm9891 It seems you misunderstood and misinterpreted the timeline of events in the original comment. Your reply criticizes the grammar of the original commenter, but the comment itself acknowledges the presence of grammar mistakes, so this criticism is redundant.
Challenged solved:
elif order == "Latte":
whip = input("Do you want extra whip cream?")
if whip == "yes":
price = 11
else:
price = 9
Excellent job!
thanks so much I could not figure it out - of course we add another variable! I was trying to allocate it to order
@@vicki-annthornton8330 cheers
New episode on python made super simple.This is very "unique" man.
Love how you make things so interesting.
Doing a python course for college super helpful. Something about the way you present the material is very simple and concise keep up the great work!
I’ve gone through this whole series in a night and I can’t be thankful enough for 1) the raspberri pi I bagged on your birthday lol and the amount of knowledge and how easy you explain it to someone who has 0 idea about anything like this! I finished the challenge and felt so good, I will forever thank you for this and your other videos Chuck! I hope you read this and acknowledge how crucial you are to an entire generation and the ones to come!
Amazing so far. I went from not knowing code yesterday to writing my own Barista in tandem with this. Even have a replit account now for it.
Going to attempt to build a game with only what was learned from 1-5. Honestly almost had it but could not figure out "elif" on my own.
Keep up the great work! You are honestly one of the greatest teachers I have had the pleasure to learn from.
Thanks God bro you're back with Python Episode kindly complete it
love your python course ♥
Oh my god your teaching style is really effective. Your 3 (4) classes are the only experience I e had with coding and I was able to solve the “allow evil Ben into the shop” problem all by myself. Thank you so much for this!!!
Dude I love the pauses bc it makes me actually try and think it through, and I also did the challenge first try !! This course is sick!
Hey @NetworkChuck. I'm 42 years old and have been wanting to learn programming my whole life, but never got around to it. Thanks for making this so accessable. I've been really enjoying your videos and how you make it fun and simple. Keep doing what you do man, because it's so good. God bless brother.
same thing here man, 41. My daughter got me into it, but Chuck is making it easy.
chunk = input(" continuing teaching? ")
if chunk = "yes":
print("thanks, keep teaching")
exit()
else:
print("you must teach, you can't leave us😅")
Use "==" to compare instead of "=". What you're doing in your example, will always return the thanks, since you're reassigning the value to the variable chunk.
you are my best teacher! Honestly the way u teach is nothing like teacher i know in real life ❤💻💻
Thank you 😊
Hey Chuck, this python playlist is truly the best I've ever seen. I literally opened a new file and started coding from your videos when I was nervous to even start by doing it. Your a great teacher and I learned a lot from your videos, excited to watch more and learn more.
Amazing!!!! The best tutorials ever, can't wait for more.
Thank you!
Thank you Chuck.
Because of you, I have started learning python and have just engaged in virtualization
It's like the tutorial is one on one and not on youtube! Chuck, you make it so easy to understand! Thanks!
Since you call the exit() function when Ben is evil, you can remove the else function and just print out the text once (instead of twice, like you have now)
That makes the code much cleaner
Don't ever quit from RUclips you are awesome
Your the only person who shows enthusiasm in teaching great teacher
I'm not sure what you've got against green tea but as a complete python noob this is one of the most easiest to follow explanations of if, elif, else I've watched!
I have my 12 yo following along with your exercises.
He's getting there. We sit down and watch your videos, then he goes and tries it out, I make myself a coffee, and I can help him when he's stuck. It's an evening routine and gets him away from the video game world for a bit to learn something useful. It's awesome.
The way you explain is really I love it, you go in core of any topic thats amazing...
Thank you!
love your python course 👍
Exceptional this is better than any university course, would love more soon! Happy to pay for large course with you teaching,
Chuck, all of your outro music is dope! I would love a link to a Spotify playlist if you have one available. I’ve also listened to your RUclips live music video a few times.
Great video! I think you skipped over one important thing regarding the "elif": The main difference between sequential if's and if..elif...elif block is the fact that 'if' statements will always be evaluated, but if...elif block will be exited at the first successful evaluation and further elif's will be omitted.
It took me hours to figure this out 🤦🏽♀️
Love your channel Network Chuck. It was “duh” on my part because I also have a text book. Your videos are helpful. And thanks for the tip @kristaps bergfelds.
I just love coming to this channel and learning some thing new each day! Thanks, Chuck!
You are explaining better than my teacher . Its perfect man
You've got to love his enthusiasm!
I’ve been a dog trainer for the last 6-7 years. I was a financial analyst who wrote a lot of VBA. I’m shocked and excited to see how similar python and VBA are so far. I was afraid I was in for a complete relearn, it it looks like I can write code like I was used to and just figure out the little quirks that are different (Colon after the if statement, etc. ). I’m also going through your ccna videos series. I’m looking into getting into cyber security. And trying to get the basics down before I dive in. Thanks so much.
Hello Chuck! First of all....You did what my previous teacher couldn't do for a pretty high salary. I'm glad I've found your channel in time, maybe i'm not totally lost after all. In my school they used every single class for torturing us mentally then somehow force the most likely raw boring staff into our head without logic or better understanding. I can't thank you enough for your precious teaching that fixes my ruined education.
I’m so happy he’s continuing the series!
Please upload more,I love these videos they make learning Python super easy,I haven’t found anyone or any source who explains Python so well as you.
Love your way of teaching. It's like Blue Clues but for adults. It helps me understand what you're teaching and you're also entertaining me while learning which makes the learning experience better.
Heeey teacher am from Ethiopia i just wnna say that i like u and u and u r best teacher ...legend. davidB too
I hope will see u and learn more
And i know u like Ethiopian natural coffee we like u too .... great teacher
in the next chapter... we'll hear about case statements... that many ifs just melts my brain
Python doesn’t have them!
@@NetworkChuck as of 3.10 they do... but its python, they just call it something different...
match VAR:
case 1:
bla
This is the best python teaching I've ever had. And i am studying it in university right now
I love your enthusiasm towards python, honestly infective
I've started college for programming and had little to none knowledge of this and the professors make it seem more complicated then it is and your showing it's easier then I thought it would be. Thanks for this series
Thanks for giving us great videos,I honestly mostly like how energetic you are in videos thanks so much!!!
i am glad that in my university we learned c language, you just need to memorize the name of some instruction (like elif) but the logic is the same
Such a good teacher, I didn't see you in the iT pro TV 🙄 you're the only teacher I want,
I love your excitment explaining such a simple if, elseif, else statement. Great job! ;)
Got it! I set a variable for whipped = input("Do you want whipped cream?
). Then I used an if statement for Yes and elif for no! You're a great teacher! Thanks.
💯Looking forward to the next episode. I absolutley love your teaching style and I cannot wait to learn more with you. Please do keep doing the videos (if you can!) 🙏
Thanks
bro you're back with Python Episode kindly complete it
What a bundle of positive energy you have in your videos. your attitude is like sunshine on a cloudy day. You are addictive to listen to.
This whole series so far has been amazing! You're a great teacher, keep up the great work! I'm mainly commenting for the RUclips Al Gore rhythm because you deserve more views. Lol
Thank you for making this python so quick!!!
I loved this series, at the end i wanted to test something so i went ahead and added a if statement if they don't order something on the menu then quantity and total becomes 0 and the code prints goodbye!, i love this !!
Na na na , You have the best course (That is python) ever. You are one of my favorite youtbers I have ever watched!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Love you chuck keep going❤
Bruh can you do a video on subnetting? Got my first job out of uni as a IT consultant and I would like an easy video around subnetting as you are the number 1 IT youtuber out there
lol i paused it and did it all in couple min ( the different prices i mean) so many errors forgot
in so many places took me like 20 mins but was worth it to see it work thx man ur the only one who i found who actually makes coding fun and u even understand a humans brain like bro u actually know whats fun and wats cringe thx again keep up the good work
I have been having issues with knowing when to use nested if statements vs. elif and you cleared that right up. Thank you so much for this video!!
wish these python episodes came faster(and please go deeper with python than most YT-tutorials). i really enjoy your python tutorials
thank you for sharing all this knowledge Chuck!
take care!
more python tutorial plkease, you're the perfect teacher for teaching python!
if name == "NetworkChuck":
evil_status = input("Are you evil?
")
if evil_status == "Yes":
print("Retaliating for all the Bens out there, you are not welcome here " + name + ", but thank you for the lessons!")
exit()
else:
print("I knew you were a good guy, NetworkChuck. Thank you for coming in and being one of the good guys!
")
Thank you chuck. I added the and condition along with the first if statement instead of using nested ifs.
I was so happy to open RUclips and see your new video, just like Xmas gifts under the tree
I LOVE THE GRIND MAN KEEP IT UP
This is the best python course ever! :) so well explained
Finally continue python series thnks
Dude your class is so amazing. Ive learned a bunch from your videos and that whipped cream challenge thing had me for a loop till I figured it out. Keep doing what your doing brother.
Thank this is what I was waiting for this is awesome 🤩 thank you 😊
I learned all of parts 1,2,3,4 and 5 in one day,hope you will post more of these,they are very entertaining and so much usefull.Now I can do basics in python and I learned that all in one day,thanks to you
Hello
My one has a problem i done everything in video it says price is not defined
@@AliAhmad-su1hw u need to define the prize.That means write a line in the python code that says : price = number.U can change the number to a price of your choice
Where did you go to school Chuck? I’m specializing in cybersecurity, and it feels like as my courses progress, your videos are nearly side-by-side to mine 😂
thanks for making the series. I love python and I just started to learn it. : )
The perfect theme song:
Placeboing - If
In high school (80's), my nickname was "Nerd" and I took that as a badge of honor, and I now crown you as a Nerd (Never Ending Radical Dude), yes I made that up.
Thank you.
Thank you brother for this privilege and opportunity. I'm enjoying these classes. I love them. God bless you brother❤️
Chuck is legendary XD. Thank you so much for the content! ^_^
Yeeeeeee from Monday I am going to have my python basic classes but I am already getting ready!!!!!!!! With you chuck thank youuuu
thanks mr chuck: if i can try this. if order == "tea" :
cream = input("Do you went whiphed cream?
")
if cream == "yes" :
price = 11
elif cream == "no" :
price = 5
Thank you very much for the course!
i love how you can write your program that you just created a bunch of different ways, Me.. I like to try to be as " Pythonic" as i can
Thank you for the lessons Chuck, You help us so much
almost 2m subs? omg i remeber when i last time wached yours movies you had under 100k sub, congrats!
The meme content from the previous video was 10/10, love these videos bro
found your channel yesterday and ive an addicition
i have learned so much from u so far. and for the whip cream challange. i did that. and on my list i have boba. so i did the same thing but it just asks what flavour boba you want. please. and seriously please. never. stop.these episodes. they are amazing i learn so much
Finaly hes back when i need em!
love your course
😃 Man, you can code AND you can teach! Superb. 👏
You should do a video about F-Strings. They let you add code into the string using curly braces (these -> {}{}{}{}).
For example, print('You have $' + money +'.') would become print(f'You have ${money}.')
Good, good! F-strings are in, concatenating is out!
Oh my science, you're amazing! Just starting to learn Python and you make it sooo easy and so clear and so fun... And yes, I'm always drinking coffee with you! OK diving into ep 6! Much love from Israel 🖤
Thank you so much for supplying everyone with this series! I was able to complete the whipped cream challenge on my first try. I am very glad that I am actually learning!!
I took a much more rudimentary approach to structuring this one and figured I might share in case someone finds it helpful!
Basically, the idea I had is that checking the name and printing the welcome message are 2 fundamentally unique tasks. So it starts like:
name = input("What is your name? ")
if name == "Ben":
evil = input("Are you evil? [y/n] ")
else:
evil = "n"
This initial portion takes the name, and if it's ben, sets evil to the answer of the question. If they're not ben, it just sets evil to no. Then it continues:
if evil == n:
print("Hello " + name + ", thank you so much for coming in today!")
else:
print("You're not welcome here! Get out!!")
exit()
This part then checks the evil state from the first process, if they're not evil it welcomes them and will continue through the script. However, if they admit to being evil, they get kicked out.
Obviously the whole point of this video was to show that nesting if statements is a thing, and it's helpful. I thought sharing this simplified example might be nice though as doing things in a process like this is nice to avoid situations like needing 2 different welcome messages (unless you want a special message for non-evil Bens, in which case this method is worse). Just one more tool in the belt.
Yess .broo its right, and also continue, cofees and this price .i am tell right or wrong .plzz answer
You do this with so much passion and enthusiasm, it greatly motivates me!
I will always love python with Chuck
Chuck I love your programming sessions it is best in the whole world