Comments in Python
- When writing code in Python, it's essential to ensure that your code can be easily understood by others, say by your friend who wants to see your code.
- Python ignores everything after the hash mark and up to the end of the line. You can insert them anywhere in your code!
- A shortcut for adding comments is by using CTRL + /

Operators
- Operators perform simple additions, comparisons, etc., on variables and values.
- Python supports the following types of operators. We will be looking at some of the commonly used operators.

Arithmetic Operators
Using Python, we can perform basic arithmetic operations such as addition, subtraction, multiplication, etc.
Example:
x = 2
y = 3
x + y # addition
x * y # multiplication

Aritmetic Operators: Meanings & Examples

Comparison Operator
- These are used to compare two values
- Gives a Boolean result (True/False)

Comparison Operators: Meanings & Examples

Logical Operator
- Logical operators are used to combine conditional statements
- Gives a Boolean result (True/False)


- To learn more about operators, visit:
https://www.w3schools.com/python/python_operators.asp - Cheat Sheet:
https://www.codecademy.com/learn/learn-python-3/modules/learn-python3-hello-world/cheatsheet
Variables
- A variable can be considered as a storage container for data.
- Every variable will have a name.
- It is a good way to store information while making it easy to refer to that information in our code later.

-
For instance, instead of working with the number 3.14, we can assign it to a variable pi and use it as many times as we want in our code (wherever required).
-
The equal sign (=) is used to assign values to variables.
-
The syntax for assigning values to a variable is as follows: Variable name = value or information.
-
Example:
- x = 5
- y = "John"
Input and Output in Python
Print Function

Input Function

