Variable A variable is a name……
Variables, expressions, statements
Variable A variable is a name used to store or refer to a value in a program.
Here: x → Variable name 10 → Value Simple definition: Value-க்கு ஒரு பெயர் கொடுத்து அதை progr……
then: x + y produces: 30 Simple definition: ஒரு value/result கொடுக்கும் ……
This is an assignment stateme……
This is a function-call statement used to display the……
இந்த three concepts-ஐ ஒரு real-life example-ல பார்க்கலாம். Suppose: price = 100 quantity = 3 total = price * ……
Variable Flow Value ↓ Variabl……
10 ↓ Assigned to x ↓ Use x anywhere Expression Flow Values / Variables ↓ Operators applied ↓ Expr……
or: variable operator variabl……
Variable என்பது ஒரு value-ஐ r……
name = "Python" Here: name → ……
Variable-ஐ ஒரு labelled box ப……
Conceptually: age → 25 Later:…
Python-ல் variable create செய்ய தனிய……
Python automatically understa……
Python is Dynamically Typed…
Later: x = "Python" Python al……
x = 100 x → variable name = →……
Valid Variable Names age = 25 student_name = "Kumar" mark1 = 90 _total = 100 All valid. Invalid Variable Name……
Variable Naming Rules Variable name can contain letters. It can contain digits. It can contain underscore _. ……
Wrong: student-name = "Arun" Python i……
Variable: Name = Value…
Left side → Name Right side →……
Multiple Assignment
Python can assign multiple va……
x, y, z = 10, 20, 30 Equivalent to: x = 10 ……
a, b = 10, 20…
Variable Reassignment
A variable value can be chang……
Why? Latest assignment replaces the ea……
Expression என்பது values, variables, operators, or function calls சேர்ந்த ஒரு com……
Expression = Calculation or v……
5 + 4…
அதனால் இது expression.…
Operand ↓ Operator ↓ Operand ……
10 + 20 10 → Operand…
- → Operator…
20 → Operand Result → 30 oper……
Operand Operator வேலை செய்யும……
10 + 20 10 → Operand 20 → Ope……
- → Operator…
Expression: x * y If: x = 10 ……
Types of Expressions
1. Arithmetic Expression…
Used for mathematical calcula……
x + y Operators: + - * / % **……
1. Relational / Comparison Ex……
Used to compare values.…
10 > 5…
=…
1. Logical Expression…
Uses logical operators.…
10 > 5 and 20 > 10…
Operators: and or not…
1. String Expression…
"Hello" + " Python"…
1. Function Call Expression…
Expression must produce a value. ……
Expression Evaluation
Python follows operator prece……
2 + 3 * 4 Python does multipl……
Parentheses can change evalua……
(2 + 3) * 4 First: 2 + 3 = 5 ……
Students may think: 2 + 3 * 4 is: 5 * 4 =……
Expression: Values + Operator……
Statement என்பது Python execute செய்யும் ஒரு comp……
Teacher student-க்கு: "Write your name." என்று ஒரு complete instructi……
Statement ↓ Python reads it ↓……
Some examples: Assignment sta……
Common Types of Python Statements
1. Assignment Statement…
1. Expression Statement…
A function call can be used a……
1. Conditional Statement…
1. Loop Statement…
1. Import Statement…
1. Return Statement…
Inside a function: return x…
1. Break Statement…
break Stops a loop.…
1. Continue Statement…
continue Skips current loop i……
x = 10 Assignment statement. y = 20 Assignment statement. total = x +……
Easy Example total = price * quantity Here: total → Variable pri……
இந்த line மிகவும் முக்கியம்: x = ……
- → Operator…
10 + 20 → Expression x = 10 +……
= and == confuse செய்வது…
x = 10 Means: 10 value-ஐ x-க்……
x == 10 Means: x value 10-க்க……
Variable name quotes உள்ளே எழ……
Because "x" is string. Correc……
Undefined Variable Wrong: print(total) without ……
Expression and Statement same என்று நினைப்பது Express……
Invalid Variable Name Wrong: ……
Variable Variable = Name x Expression Expression = Calculate x + y Statement Stateme……
A variable is a name that ref……
The assignment operator is: =…
An expression produces a valu……
A statement is a complete ins……
In: x = a + b a + b is an exp……
The complete: x = a + b is an……
Python variable names are cas……
Variable names cannot begin w……
Python keywords cannot normal……
= means assignment, while == ……
What is a variable in Python? Answer A variable is a name that……
What is an expression in Python? Answer An expression is a……
x + y…
What is a statement? Answer A statement is a complete instruc……
What is the difference between = and ==? Answer = is the assignment opera……
Is x + y an expression or statement? Answe……
In result = x + y, what is the expression? Answ……
Which is a valid variable ass……
Which of the following is an ……
In: x = 10 + 20 Which is the ……
What is the value of x? x = 1……
Which is an invalid variable ……
What does = represent in Pyth……
Which operator checks equalit……
What is the output? x = 5 y =……
What is the output? x = 10 pr……
What is the result? 2 + 3 * 4…
Which statement assigns the same value to three variables? A. x,……
What is the output? a = 10 b ……
Create three variables: name ……
Write an expression to add: 2……
Find the variable, expression, and statement: total = price * quantit……
Find the output: x = 5 y = 2 ……
Find the output: x = 10 x = x……
Correct the invalid variable:……
What is the difference? x = 10 and: x ……
Evaluate: 10 + 2 * 5 Answer: ……
Evaluate: (10 + 2) * 5 Answer……
Write a program using: two variables one a……
Variable என்பது value-ஐ refer செய்யும் பெயர். Variable assignment = operator மூலம் செய்யப்படுகிறது. Python va……
Variable → Name referring to a value x = 10 → Assignment x → Variable 10 → Value = → Assignment operator Expr……