We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9780ab commit b563ac0Copy full SHA for b563ac0
1 file changed
CircuitPython_Templates/i2c_mcp9808/code.py
@@ -9,5 +9,5 @@
9
while True:
10
temperature_celsius = mcp9808.temperature
11
temperature_fahrenheit = temperature_celsius * 9 / 5 + 32
12
- print("Temperature: {} C {} F ".format(temperature_celsius, temperature_fahrenheit))
+ print("Temperature: {:.2f} C {:.2f} F ".format(temperature_celsius, temperature_fahrenheit))
13
time.sleep(2)
0 commit comments