MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / reaumur_to_fahrenheit

Function reaumur_to_fahrenheit

conversions/temperature_conversions.py:325–341  ·  view source on GitHub ↗

Convert a given value from reaumur to fahrenheit and round it to 2 decimal places. Reference:- http://www.csgnetwork.com/temp2conv.html >>> reaumur_to_fahrenheit(0) 32.0 >>> reaumur_to_fahrenheit(20.0) 77.0 >>> reaumur_to_fahrenheit(40) 122.0 >>> reaumur_to_fahr

(reaumur: float, ndigits: int = 2)

Source from the content-addressed store, hash-verified

323
324
325def reaumur_to_fahrenheit(reaumur: float, ndigits: int = 2) -> float:
326 """
327 Convert a given value from reaumur to fahrenheit and round it to 2 decimal places.
328 Reference:- http://www.csgnetwork.com/temp2conv.html
329
330 >>> reaumur_to_fahrenheit(0)
331 32.0
332 >>> reaumur_to_fahrenheit(20.0)
333 77.0
334 >>> reaumur_to_fahrenheit(40)
335 122.0
336 >>> reaumur_to_fahrenheit("reaumur")
337 Traceback (most recent call last):
338 ...
339 ValueError: could not convert string to float: 'reaumur'
340 """
341 return round((float(reaumur) * 2.25 + 32), ndigits)
342
343
344def reaumur_to_celsius(reaumur: float, ndigits: int = 2) -> float:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected