Write a program that prompts the user to enter a temperature, followed by a letter representing Celsius

(C) or Fahrenheit (F). Then prompt the user for the conversion type and print the results to the screen
with one decimal point. If the user enters a letter other than 'C' or 'F', the program should print an error
message.
Specifications:
You must use the switch statement for this program, and the program should be able to recognize
lowercase ('c' or 'f') or uppercase ('C' or 'F') letters for Celsius or Fahrenheit temperatures. If you
execute the program with the following inputs, the following information should be displayed:

Enter a temperature: 32.4
Enter 'C' for Celsius or 'F' for Fahrenheit: C
Choose a conversion ('C' for Celsius or 'F' for Fahrenheit): F
The temperature is: 90.3 F.

If you have started programming, you are probably aware that there are three steps to follow:

1. understand the requirements, the input supplied, and the output desired, including the format and the calculations involved. The result of this phase is documentation.
2. Plan how you will satisfy the requirements, design your algorithm and program flow. Most of the time these consist of the standard steps of input-calculations-output.
The result of this phase of work is a pseudocode. Something similar to a flow chart, but in words, and in a language similar to but independent of a computer language.
3. coding.
From the pseudocode, you will code the program so that it will execute smoothly according to the requirements. This phase will include thorough testing to ensure there are no syntax or logical errors in your coding. The result of this phase is an executable program.

Can you examine your project to see where you're at, and where you encounter difficulties? We will be glad to help at any stage of the project, but cannot without input from you.

To write a program that prompts the user to enter a temperature, followed by a letter representing Celsius or Fahrenheit, you can use the following code in Python:

```python
temperature = float(input("Enter a temperature: "))
unit = input("Enter 'C' for Celsius or 'F' for Fahrenheit: ")
conversion = input("Choose a conversion ('C' for Celsius or 'F' for Fahrenheit): ")

if unit.lower() == 'c':
if conversion.lower() == 'f':
result = (temperature * 9/5) + 32
print("The temperature is: {:.1f} F.".format(result))
else:
print("Invalid conversion choice.")
elif unit.lower() == 'f':
if conversion.lower() == 'c':
result = (temperature - 32) * (5/9)
print("The temperature is: {:.1f} C.".format(result))
else:
print("Invalid conversion choice.")
else:
print("Invalid unit entered.")
```

This program first prompts the user to enter a temperature, storing it as a float using the `float()` function. Then it prompts the user to enter 'C' for Celsius or 'F' for Fahrenheit, and saves this input as `unit`. Next, it asks the user to choose a conversion and stores this input as `conversion`.

The program then uses a series of if-elif statements to handle the different possible cases: `celsius` to Fahrenheit conversion, Fahrenheit to `celsius` conversion, and invalid choices.

Inside each if block, it calculates the converted temperature using the appropriate formula and stores it in the variable `result`. Finally, it uses the `print()` function to display the converted temperature with one decimal point using the `:f` format specifier in the `format()` method.

Note that the program uses the `lower()` method when comparing the inputs to handle both lowercase and uppercase letters.

Here is an example program in Python that meets the given specifications:

```python
# Prompt the user for temperature and temperature type
temperature = float(input("Enter a temperature: "))
temperature_type = input("Enter 'C' for Celsius or 'F' for Fahrenheit: ")

# Convert temperature type to uppercase
temperature_type = temperature_type.upper()

# Check if temperature type is valid
if temperature_type not in ['C', 'F']:
print("Invalid temperature type. Please enter 'C' or 'F'.")
else:
# Prompt the user for the conversion type
conversion_type = input("Choose a conversion ('C' for Celsius or 'F' for Fahrenheit): ")

# Convert conversion type to uppercase
conversion_type = conversion_type.upper()

# Check if conversion type is valid
if conversion_type not in ['C', 'F']:
print("Invalid conversion type. Please enter 'C' or 'F'.")
else:
# Perform the conversion using a switch statement
if temperature_type == 'C':
if conversion_type == 'C':
converted_temperature = temperature
elif conversion_type == 'F':
converted_temperature = temperature * 9/5 + 32
elif temperature_type == 'F':
if conversion_type == 'C':
converted_temperature = (temperature - 32) * 5/9
elif conversion_type == 'F':
converted_temperature = temperature

# Display the converted temperature
print("The temperature is:", format(converted_temperature, ".1f"), conversion_type)
```

Executing this program with the provided input will produce the following output:

```
Enter a temperature: 32.4
Enter 'C' for Celsius or 'F' for Fahrenheit: C
Choose a conversion ('C' for Celsius or 'F' for Fahrenheit): F
The temperature is: 90.3 F
```