Python Compiler : Python

#Use "F" to convert a number into a fixed point number, but display inf and nan as INF and NAN: mrx = float('inf') text = "The price is {:F} dollars." print(text.format(mrx)) #same example, but with a lower case f: text = "The price is {:f} dollars." print(text.format(mrx))