How we use arithmetic operators , loops and conditional statements in python?Arithmetic operators are used to perform mathematical operations like addition, subtraction, multiplication and division.
example:
x=20
y=10
z= x + y
print(z)
z=x * y
print(z)
etc.
The for loop in Python is used to iterate over a sequence (list, tuple, string) or other iterable objects. Iterating over a sequence is called traversal.
example:
for n range(10)
print(n)
j = 1
while j < 6:
print(j)
j+= 1
Conditional Statement in Python perform different computations or actions depending on whether a specific Boolean constraint evaluates to true or false. Conditional statements are handled by IF statements in Python.
example:
if expression
Statement
else
Statement