Conditional using Python

Hello to everyone here we have another lesion on Python. I’am today are going to talk about Conditional. So in Python we have three type of Conditional. The first is “if“, that is the first condition used on Python. For the rest of condition   “elif”   or “else” .

ans=input(Is your birthday? (y/n)”#The program is asking about your birthday 

if   ans==“y”# if is the first condition that we use on python! If the user input is y

             print(“Happy birthday!!” #the output is “Happy birthday!!”

elif ans==“n”#When the input is not predicted in  if ,we use elif (for another possible                 print(“When is your birthday?”)                                                                            input)

else:                         #We use else for including all other possible inputs

print(“Sorry i didn’t  get that!”)

See you in the next tutorial.Feel free to comment down below for every comment or suggestion that you might have.

You can also follow us on facebook for more updates  


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s