Day 01 - Class Work

Getting started with Python programming

Run Your First Program

Learning Objectives

  • Understand how to write and execute Python code
  • Learn the basic syntax of the print() function
  • Create your first program that displays output

Write and run the following code in your Python environment:

print("My name is Ashok")
print("My age is 35")
print("I am a software architect with 15 years of experience")
print("I like programming languages")
print("I love teaching")

Challenge: Modify the code to display your own information instead!

Introducing Variables

Learning Objectives

  • Understand the concept of variables in programming
  • Learn how to store and reuse values with variables
  • Combine variables with text output

Write and run the following code to understand how variables work:

name = "Ashok"
school = "ABC School"
age = 8
student_class = "Grade 3: Section C"

print(name)
print(school)
print(student_class)
print(age)

Students tried a similar exercise, learning by doing rather than by theory.

Next Step: Try modifying the values of the variables and see how the output changes!