Skip to main content

Operators

Hey guys. This is an interesting, yet simple post on operators.

There are three types of operators.


1. Arithmetic Operator

This operator type is easy to understand. These are just the signs for the different arithmetic operations.

Addition    :    +

Subtraction    :    -

Multiplication    :    *

Division    :    /


2. Conditional Operators

These signify conditions, for example, two statements are given. If we put the AND conditional operator, only if both are true, the output will be true. If we use the OR conditional operator, at least one has to be true for output to be true. If we use the NOT conditional operator, both should be false for the output to be true.


3. Relational Operators

These show the relation between 2 integers. The operators are:

Equal to    :    ==

Not equal to    :    !=

Lesser than    :    <

Greater than    :    >

Lesser than or equal to    :    <=

Greater than or equal to    :    >=


That's all on this post guys, stay tuned for my next one, bye.

Comments

Popular posts from this blog

Interpreter Based and Compiler Based Languages

Hey y'all! I'm back. This time, with something more interesting.  Let's learn about the differences between the compiler based and interpreter based languages. Let's start guys! So what are interpreter based and compiler based languages? An interpreter based language scans each line of the code for an error. If it finds one, it will stop scanning further and highlight the error. Whereas, a compiler based language will scan the whole code and then check for errors, and will just display error, as a whole. It won't specify in which line and what the error is. So that's why the interpreter based languages like Python are far more preferred than compiler based languages (Like HTML). They are more user friendly and accurate. Stay tuned for my next post guys, hope this one was informative. Till then, goodbye.

Introduction to Python

Hi! I'm Abinav! Have you ever heard the word Python before? I'm sure you have. So what do you think it means? Well, it means two things: 1. A venomous snake 2. An incredibly mind-boggling code language. Don't be scared! We're not gonna focus on the snake, we'll get to know the language instead! OFF-TOPIC ALERT ! Although we're not focusing on it, let me just tell you this. The snake is actually not venomous, it is our misapprehension that it is dangerous, in fact, ball pythons are incredibly common pets. However, pythons constrict and kill, so they are still dangerous... but let's not get too distracted. Back to the language. WHAT IS PYTHON? Python is an interpreter based code language founded and released in 1991 by Guido van Rossum, a Dutch web developer. Hang on! What to all these fancy terms mean? Stay tuned for my next post to understand. Oh, dang, I forgot to tell you something! Why is Python preferred over other code languages? Well, there are many re...

If - Elif - Else

Hey guys, this will be my last post, thanks you for the support you have given me so far, if you still have doubts on Python after this, feel free to do your own research or contact me on my mail ID: abinav1708@gmail.com This post will be about if, elif, and else: These three are also a type of conditional operator. There will be a condition on everything except else, so we have to be very specific before putting it, as if none of the conditions listed above are true, the else factor will come into effect in the output. Let me show you a sample code, without output. So, we have to be very careful if we use these, so make sure that you go through my code properly to not make the mistakes I first made. This, especially, is a very delicate concept of Python. So, anyways, I hope you find my last post, and the entire blog insightful, it's been a nice time posting daily, I'll miss you all. This is Abinav, signing out. Goodbye!