Need Help with print in Python

Hi , I am new at codecademy and I am currently taking the Data Scientist class.
I was doing this exercise https://www.codecademy.com/paths/data-science/tracks/dscp-python-fundamentals/modules/dscp-python-syntax/lessons/python-hello-world/exercises/calculations
so I was asked to print this calculation: print( 25 * 68 +13/28) so my concern is why don’t we use the quotes sign for this print in this operation?

quotes around that would give you a string that says 25 * 68 +13/28 instead of the result of the calculation.

print("25 * 68 +13/28") print(" is ") print(25 * 68 +13/28)

If you’re doing that calculation by hand, don’t forget the order of operations!

1 Like

Numeric data types (integer, float, complex) don’t need quotes. Whereas strings do need " ".
Booleans (True, False) also don’t need quotation marks.

See the documentation:

https://docs.python.org/3/library/datatypes.html

And, here for a shall we say, less dry explanation:
https://www.geeksforgeeks.org/python-data-types/#numeric

Thank you so much for clearifying this matter, I am so happy joining this useful Forums.

1 Like