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  

Advertisements

6 thoughts on “Conditional using Python

  1. You could certainly see your enthusiasm in the work you write. The arena hopes for more passionate writers like you who aren’t afraid to mention how they believe. Always follow your heart.

    Liked by 1 person

  2. I am no longer positive where you’re getting your info, however good topic. I must spend a while finding out more or figuring out more. Thanks for fantastic information I was looking for this information for my mission.

    Liked by 1 person

  3. magnificent submit, very informative. I’m wondering why the opposite specialists of this sector don’t understand this. You must continue your writing. I am confident, you’ve a huge readers’ base already!

    Liked by 1 person

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s