Cross_Column

Sunday, 18 January 2026

Python Syntax & Indentation, Python Variables and Data Types




Hello Friends,

Python Syntax and Indentation

Python uses indentation instead of brackets to define code blocks.

Correct Example

if 10 > 5:
    print("10 is greater than 5")

Incorrect Example

if 10 > 5:
print("Error")
=======================================================================

Variables and Data Types

Variables store data values in Python.

Common Data Types

  • int
  • float
  • string
  • boolean

Example

age = 30
name = "Chandan"
price = 99.50
is_active = True

print(age)
print(name)
print(price)
print(is_active)

No comments:

Post a Comment

Few More

Python String Handling

Hello Friends, String Handling in Python A string in Python is a sequence of characters enclosed within single quotes ( ...