Practical – 148 : Write and test a python program to demonstrate print statement,comments, different types of variables
# This is a simple Python program
# It shows how to use print, comments, and variables
# Printing a welcome message
print(“Welcome to Python Programming!”)
# Integer variable
age = 20
print(“Age:”, age)
# Float variable
height = 5.8
print(“Height:”, height)
# String variable
name = “Saiyam”
print(“Name:”, name)
# Boolean variable
is_student = True
print(“Are you a student?”, is_student)
# Multiple variable assignment
x, y, z = 10, 20.5, “Python”
print(“Multiple values:”, x, y, z)
# Inline comment: below line adds two numbers
sum_result = x + y # x is int, y is float
print(“Sum of x and y:”, sum_result)
OUTPUT :
Welcome to Python Programming!
Age: 20
Height: 5.8
Name: Saiyam
Are you a student? True
Multiple values: 10 20.5 Python
Sum of x and y: 30.5