Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#main function def main(): print(1. Convert Fahrenheit to Celsius) print(2. Convert Celsius to Fahrenheit) print(3. Convert feet to meters) print(4. Convert meters to feet) print(5.

#main function def main(): print("1. Convert Fahrenheit to Celsius") print("2. Convert Celsius to Fahrenheit") print("3. Convert feet to meters") print("4. Convert meters to feet") print("5. Display a phrase or number backwards") print("0. Quit") choice = int(input("Enter choice")) if choice == 1: tempF = int(input("Enter temp in fahrenheit: ")) tempC = fahrenheit_to_celsius print("temp in celsius:" "{32f}".form(tempC)) elif choice == 2: tempC = int(input("Enter temp in celsius: ")) tempF = celsius_to_fahrenheit print("temp in fahrenheit:" "{32f}". form(tempF)) elif choice == 3: feet = int(input(" Enter extent in feet: ")) meters = feet_to_Meters print("Extent in meters:", "{32ft}". form(mters))

elif choice == 5: phrase = int(input("Enter a phrase or number: ")) reversedPhrase = reversePhrase print("Phrase or Number in backwards:", reversedPhrase) while chocie == 0: break

Enter choice1 Enter temp in fahrenheit: 32 Traceback (most recent call last): File "/Users/alaamahmoud/Desktop/fsfg.py", line 12, in tempC = fahrenheit_to_celsius NameError: name 'fahrenheit_to_celsius' is not defined

how can I fix the error?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago