Python Programming Tutorial #4 - IF/ELIF/ELSE

preview_player
Показать описание
This is the fourth video in my python programming series. In this video I explain how to use the if, elif and else keywords in python make decisions.

Python is a great language to learn as it is widely used and fairly simple. It offers a great foundation for future programming learning. Stay tuned for more content coming everyday!

As always please remember to LIKE and SUBSCRIBE!

Video Tags:
python,python tutorial,python language,python full course,python course,learn python,learn python programming,python tutorial for beginners,python tutorial 2018,python programming tutorial,python programming language,software development,programming tutorial,freecodecamp
Рекомендации по теме
Комментарии
Автор

height = int(input())
that way you can put in just 'if height < 1:' and it will read height as integer, not string
that way you won't have to put [int(height)]
that also works for float [ bla = float(input())] and sting, but if you do it you do it your way with just input() I guess you don't have to do it like [ bla = str(input()) ]

mastertoot
Автор

You're a blessed teacher, Tim! I've been through so many tutorials here and in several apps (free and paid) and only now do I get to the point where I can actually understand everything, because you're giving the context for everything you're explaining. I'll definitely stick to your channel and website from now on. Please don't leave us when you're done with your studies 🙏

Anastasia-wyuj
Автор

Hey Tim,
If your reading, I wanted I've started coding because I was interested and I was bored from the confinement. I fell in LOVE with it and I just wanted to thank you because I never would have learned JavaScript and I woudlnt be learning Python.
Also, Am I the only one here in 2020?

ThePhantomCoder
Автор

best tutorial i have found so far on youtube made for beginners. Good work.

Nipy
Автор

did something like that


name = str(input("Hey! What's your name? "))
height = float(input("Hello again, "+name+"! What's your height?"))

if height < 1:
print("You can't ride, under 1m")
elif height > 2:
print("You can't ride, over 2m")
else:
print("Enjoy your ride! :)")

mephystto
Автор

Basically, you can directly convert your input statement by putting int keyword before input statement, as follows :
height = int(input("Please input your height: "))

thodosinaga
Автор

Day 3 and I'm on video 4, hoping to get through all of the python series by end of summer. Thanks Tim for simplified explanations

JustifiedWar
Автор

i created this is it good
age= input("what is your age?")
if int(age)>16:
print("hey your old")
if int(age)<16:
print("hey your young")

templetherapy
Автор

Thank you! These videos are super useful

esterad
Автор

Great Tutorial as always. Easily understood everything!

evantuladhar
Автор

print("Thank you for this great tutorial")

truetalktamil
Автор

Thank you Tim for being my companion through programming

janspawalski
Автор

Thank you! I made my own handy calculator (Without the create canvas stuff) and it's SOO useful without the 10 * e+10 kinda nonsense.

Sciencedoneright
Автор

You can also write:
if int(height) < 2:
print("You cannot ride.")

this way:
if height < "2":
print("You cannot ride.")

LearninNrelaxin
Автор

these are great. Hope your Youtube channel is gonna help me get through all python journey...
We will see as proceeding with :)

ugurbayrak
Автор

Thanks you for clearly English and good lessons! Watching without subs (english is not my native)

dv
Автор

hey i am amazed by your coding skills which resources do you start for learning python especially text

teimoorbahrami
Автор

Tim what do you think of following along in Jupyter Notebook, and about Jupyter Notebook in general? I saw in your tips for beginners video that you do not recommend IDEs for beginners. Do you think Jupyter Notebook counts as an IDE? It doesn't make suggestions or auto-fill in for syntax as far as I can tell. I guess I got comfortable working there as opposed to IDLE or note pad ++, but I would definitely go away from Jupyter Notebook if you thought it was going to hamstring my understanding of fundamentals somehow. Amazing videos by the way!

TheDorfan
Автор

Great videos!!!! Is it possible you can do an error video “python errors and debugging” thanks in advance 👍🏿

Kaspian
Автор

Nice video
Watched at 2x
Meet you in next one

eswarspython