Input Centigrade and output Fahrenheit.
★☆☆Fahrenheit was once the main scale used in England and is still widely used in America, although the founding fathers thought about adopting the metric system instead. Around 1965, Britain began switching towards the metric system.
Write a program that converts between Centigrade and Fahrenheit.
Remember to add a comment before a subprogram to explain its purpose.
c_to_f so that:c_to_f subprogram.Enter the temperature in Centigrade: 30
30 degrees Centigrade is 86.0 degrees Fahrenheit.
# Temperature converter program
# -------------------------
# Subprograms
# -------------------------
# Convert Centigrade to Fahrenheit
---
def c_to_f(centigrade):
---
return (centigrade * 1.8) + 32
---
# -------------------------
# Main program
# -------------------------
---
centigrade = int(input("Enter the temperature in Centigrade: "))
---
fahrenheit = c_to_f(centigrade)
---
print(centigrade, "degrees Centigrade is", fahrenheit, "degrees Fahrenheit.")