So i have started out a course on python 3 and i am pushing through and picking up what i can but i came across something that has me confused and i am more intreuged than anything.
i am currently on the “Getting Ready for Physics Class” section of python 3 and I like to see the output of what i am doing. i was wondering if anybody can tell me why using \n in a print statement breaks if there is a “,”
Example: ( this one doesn’t work )
print("C to F Test: " + str(c0_in_fahrenheit), "\nF to C Test: " + str(f100_in_celsius))
‘C to F Test: c0_in_fahrenheit’, ‘\nC to F Test: f100_in_celsius’
however this works.
print("C to F Test: " + str(c0_in_fahrenheit) + "\nF to C Test: " + str(f100_in_celsius))
C to F Test: c0_in_fahrenheit
F to C Test: f100_in_celsius
i don’t know if i need to know this but i would like to just because it interests me