def fahrenheit_to_centigrade(deg_fahrenheit):
deg_c = (deg_fahrenheit - 32.)*5./9.
return deg_c
for deg_F in [-40, -30, -20, -10, 0, 10, 50, 100]:
conv_temp = fahrenheit_to_centigrade(deg_F)
print(f"{deg_F:f} degrees F is {conv_temp:f} degrees C")
Above is a function I have been given (intro to python so I apologise in advance if this is a terribly stupid question). I don't understand the
:f
bit in the final print statement (after deg_F and conv_temp)? What does it mean? Does it modulate the outcome so the values are of the same sig.f / class? Does this have a name so I can look it up myself?