Convert a given value from reaumur to rankine and round it to 2 decimal places. Reference:- http://www.csgnetwork.com/temp2conv.html >>> reaumur_to_rankine(0) 491.67 >>> reaumur_to_rankine(20.0) 536.67 >>> reaumur_to_rankine(40) 581.67 >>> reaumur_to_rankine("re
(reaumur: float, ndigits: int = 2)
| 361 | |
| 362 | |
| 363 | def reaumur_to_rankine(reaumur: float, ndigits: int = 2) -> float: |
| 364 | """ |
| 365 | Convert a given value from reaumur to rankine and round it to 2 decimal places. |
| 366 | Reference:- http://www.csgnetwork.com/temp2conv.html |
| 367 | |
| 368 | >>> reaumur_to_rankine(0) |
| 369 | 491.67 |
| 370 | >>> reaumur_to_rankine(20.0) |
| 371 | 536.67 |
| 372 | >>> reaumur_to_rankine(40) |
| 373 | 581.67 |
| 374 | >>> reaumur_to_rankine("reaumur") |
| 375 | Traceback (most recent call last): |
| 376 | ... |
| 377 | ValueError: could not convert string to float: 'reaumur' |
| 378 | """ |
| 379 | return round((float(reaumur) * 2.25 + 32 + 459.67), ndigits) |
| 380 | |
| 381 | |
| 382 | if __name__ == "__main__": |
nothing calls this directly
no outgoing calls
no test coverage detected