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

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

Skip to main content

Lesson 3 - Assignment

Objective:

Understand how to create variables with valid names, assign multiple values, and convert between data types.

 

Tasks:

1.    Multiple Assignments:

o   Assign values "apple", "banana", and "cherry" to variables a, b, and c in one line.

o   Assign "fruit" to variables x, y, and z using a single line.

o   Print all variables.

2.    Casting Practice:

o   Convert a string "50" to an integer and perform an addition with another number (e.g., 20).

o   Convert an integer to a string and concatenate it with another string (e.g., name).