[Type A] Python Revision Tour-1 – Chapter 1

|
Table of Contents

9. What is an expression and a statement?

An expression is a combination of values, variables, operators, and function calls that evaluates to a value. Examples include 5 + 3, x * y, etc.

A statement is a complete line of code that performs some action. It can be an assignment statement, a function call, a loop, etc. Examples include x = 5, print("Hello"), for i in range(5):, etc.

"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *