Write a Python function that meets the following requirements: Name the function degreeFormatter. The function will accept two arguments: A float value representing a temperature (for example: 210.8); An optional parameter of a string value representing a temperature scale. Values may be “F” for Fahrenheit, “C” for Celsius, “K” for Kelvin, and “R” for Rankine. The default value for the currency symbol (optional parameter) should be a “C” for Celsius. The function will return a formatted currency value (for example: 210.8 Celsius).

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.2: Returning A Single Value
Problem 3E
icon
Related questions
Question

Python 3

Write a Python function that meets the following requirements:

  • Name the function degreeFormatter.
  • The function will accept two arguments:
    • A float value representing a temperature (for example: 210.8);
    • An optional parameter of a string value representing a temperature scale. Values may be “F” for Fahrenheit, “C” for Celsius, “K” for Kelvin, and “R” for Rankine.
  • The default value for the currency symbol (optional parameter) should be a “C” for Celsius.
  • The function will return a formatted currency value (for example: 210.8 Celsius).
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr