My First Python Program – Learning print() and Variables
THEORY AND PRACTICAL
• This program shows how to use variables in Python.
• name is a variable that stores text data (string).
• age is a variable that stores number data (integer).
• print(name) displays the stored name on the screen.
• print(age) displays the stored age on the screen.
• Python reads the program line by line.
• Variables help us store and reuse data easily.
Today I wrote my first Python program. I started learning the basics of Python programming.
The first thing I learned is the print()
Print() is used to display output on the screen.
Example:
Print(“Hello World")
When I run this code, it shows Hello World on the screen.
Then I learned about variables.
Variables are used to store data.
Example:-
name = "Dhanush”
age = 18
print(name)
Print(age)
In this program:
• name stores my name
• age stores my age
I understood that Python reads code line by line.
This is just the beginning of my Python journey. Tomorrow I will learn about data types.
📘 What I Learned :
• How to create variables.
• Difference between string and integer.
• How print() works.
• How Python executes code.
🎯 Conclusion Line
Today I understood how variables work in Python. This is helping me build a strong foundation in programming.
Good journey choiced bro continue
ReplyDeleteTq bro ❤️
Delete