4. Literals or Constants

"""
Fahrenheit, 5, 32 and 9 are literal or constant values.
"""
F = float(input("Fahrenheit: "))
C = 5 * (F - 32) / 9
print("Celsius: %2.1f" % C)
1print(int("32") == 32)
2print("32" == str(32))
3print(32 == "32")
line that just executed

next line to execute

Print output (drag lower right corner to resize)
Frames
Objects

Activity: CodeLens 4.1 (cl_l40_4_en)

You have attempted 1 of 2 activities on this page