💡 For the best experience, set your browser zoom level to 75%

    ‎75%‎ للحصول على أفضل تجربة، اضبط مستوى تكبير المتصفح على 💡

Skip to main content

Lesson 6 – Assignment

 

Objective:

Practice using arithmetic, assignment, comparison, and logical operators in Python.

 

Tasks:

1.    Arithmetic Operators:

o   Create two variables: a = 15, b = 4

o   Perform and print the result of the following operations:

§  Addition, Subtraction, Multiplication, Division, Modulus, Exponentiation, Floor Division

2.    Assignment Operators:

o   Start with x = 10

o   Apply the following assignments and print x after each:

§  x += 5

§  x -= 3

§  x *= 2

§  x /= 4