A
Anagha
asked

Expert
Sudip Bhandari answered
The reason the numbers 25 and 100 arenât inside quotes is because they are being treated as numeric values, not text (strings).
In Python, when you put a number inside quotes, it becomes a stringâwhich is a different data type.
If you want to perform calculations like addition, subtraction, or division, you should keep numbers without quotes so Python knows they are numeric values.
In your example:
age = 25
print(age)
age = 100
print(age)Here, age is initially assigned the numeric value of 25 and later changed to 100. That's why you see them without quotes and why they print as numbers.
Hope this helps! Let me know if you have more questions.
Python
This question was asked as part of the Learn Python Basics course.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer
