Python if statements 🤔

preview_player
Показать описание
python if statements tutorial explained

#python #if #statements

––––––––––––––––––––––––––––––
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
––––––––––––––––––––––––––––––
Рекомендации по теме
Комментарии
Автор

# if statement = a block of code that will execute if it's condition is true

age = int(input("How old are you?: "))

if age == 100:
print("You are a century old!")
elif age >= 18:
print("You are an adult!")
elif age < 0:
print("You haven't been born yet!")
else:
print("You are a child!")

BroCodez
Автор

age= int(input("Enter your age :"))
if age>=18 and age<100:
print("Your are an adult ")
elif age==100:
print("You are year's old")
elif age>100:
print("!!!!")

elif age<=0:
print("Just go back ")
else:
print("You are a child ")



We can do in this way aswell

Sakshi-zsqg
Автор

This dude alone pulling out all those who aspire to code. Respect for this man

stackfrostdev
Автор

comment1 = "I made it this far."
comment2 = "I will go ahead to the next one."

print(comment1)
print(comment2)

davelaff
Автор

In order to manage decimals (e.g. age of 5 years and a half = 5.5), you'd better define age as float instead of int, otherwise you get an error.

renatos
Автор

dropped a comment for keep this channel running

aliyagzcaniguroglu
Автор

Thanks Bro... Very easy to understand.

Dreamon-nptb
Автор

I wish I would’ve known about you a year ago, you would’ve helped me so much in engineering 102

karsonbynum
Автор

10/10 would recommend for anyone who has to take a coding class

karsonbynum
Автор

Can you do python csv files next ?
How to add extra columns/rows
How to change

Caleepo
Автор

Bro code, hello Bro, thanks a lot for your videos.
You do big deal.

If for you not a problem, please do some videos about ruby and rails or gosu/shoes(game)

ArmSexUnit
Автор

This guy deserves 1M followers and likes on eatch video!!!

kolima