Question

Write python program using IDLE Write a full program that asks the user to enter his/her...

Write python program using IDLE

Write a full program that asks the user to enter his/her name then repeatedly ask to enter the temperature in Fahrenheit and convert it to Celsius, the program should then prompt the user if he/she wants to continue or exit the program. The formula for the conversion is: °C = (°F - 32) x 5/9

The program should use a function for the conversion. An Example of a sample run should appear on the screen like the text below:

Please enter your name:

Jessica

Welcome Albert to the Temperature Converter Application

Please enter your temperature in Fahrenheit

86

Computing...
The temperature in Celsius is 30

Do you want to continue Type Y for Yes or N for No?

Y

Please enter your temperature in Fahrenheit

32

Computing...
The temperature in Celsius is 0

Do you want to continue Type Y for Yes or N for No?

N

Exiting...
Thank you, Jessica, for using the Convertor Application 

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Note: Please follow the space indentation as per in the program screen shot.So that you wont get any errors.

Could you plz go through this code and let me know if u need any changes in this.Thank You
=================================

======================================

#Function which converts Fahrenheit to celsius
def fahrenheitToCelsius(fahren):
return 0.556 * (fahren - 32.00);


fahrenheit=0
celsius=0

#Getting the name entered by the user
username=input("Please enter your name:")
print("Welcome %s to the Temperature Converter Application"%username)
while 1:
#Getting the temperature entered by the user
fahrenheit=float(input("\nPlease enter your temperature in Fahrenheit :"))
print("Computing...")
#calling the function
Celsius=fahrenheitToCelsius(fahrenheit)
print("The temperature in Celsius is %d"%Celsius)
choice=input("Do you want to continue Type Y for Yes or N for No?")
if choice=="y" or choice=="Y":
continue
elif choice=="n" or choice=="N":
break
  
print("Exiting...")
print("Thank you, %s, for using the Convertor Application "%name)

=======================================

Output:

=====================Could you plz rate me well.Thank You

main.py #Function which converts Fahrenheit to celsius 2. def fahrenheitToCelsius(fahren): return 0.556 * (fahren - 32.00); COVOU A w fahren=0 celsius=0 13 9 #Getting the name entered by the user 10 name=input("Please enter your name: "); 11 print("Welcome %s to the Temperature Converter Application "%name) 12 while 1: #Getting the temperature entered by the user fahren=float(input("\nPlease enter your temperature in Fahrenheit :")) print("Computing...") #calling the function Celsius-fahrenheitToCelsius(fahren), print("The temperature in Celsius is %d"%Celsius) choice=input("Do you want to continue Type Y for Yes or N for No?"), if choice! ="y" and choice!="Y": break; 22 23 print("Exiting...") 24 print("Thank you, %s, for using the Convertor Application "%name) 25

Please enter your name: Jessica Welcome Jessica to the Temperature Converter Application Please enter your temperature in Fahrenheit :86 Computing... The temperature in Celsius is 30 Do you want to continue Type Y for Yes or N for No?Y Please enter your temperature in Fahrenheit :32 Computing... The temperature in Celsius is o Do you want to continue Type Y for Yes or N for No?N Exiting... Thank you, Jessica, for using the Convertor Application ... Program finished with exit code o Press ENTER to exit console.

Add a comment
Know the answer?
Add Answer to:
Write python program using IDLE Write a full program that asks the user to enter his/her...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • write in python idle Write full program that asks the user to enter his/her name then...

    write in python idle Write full program that asks the user to enter his/her name then repeatedly ask to enter the temperature in Fahrenheit and convert it to Celsius, the program should then prompt the user if he/she wants to continue or exit the program. The formula for conversion is: °C = (°F - 32) x 5/9 The program should use a function for the conversion. An Example of a sample run should appear on the screen like the text...

  • Write a C++ program that prompts a user to enter a temperature in Fahrenheit as a...

    Write a C++ program that prompts a user to enter a temperature in Fahrenheit as a real number. After the temperature is entered display the temperature in Celsius. Your program will then prompt the user if they want to continue. If the character n or N is entered the program will stop; otherwise, the program will continue. After your program stops accepting temperatures display the average of all the temperatures entered in both Fahrenheit and Celsius. Be sure to use...

  • Create a program in Python that will allow the user to enter a temperature in Fahrenheit...

    Create a program in Python that will allow the user to enter a temperature in Fahrenheit which will then be converted to degrees Celsius. The program will keep asking the user for a Fahrenheit temperature until the user enters Q to quit. After each conversion the program needs to print out the degrees Celsius. The input prompts for this problem need to look like the following: Degrees Fahrenheit: Continue: For these input prompts watch the capitalization and spacing. There are...

  • C# Temp. Converter program. Create a Celsius and Fahrenheit Temperature Converter application. The application must have...

    C# Temp. Converter program. Create a Celsius and Fahrenheit Temperature Converter application. The application must have 2 Labels (each one of them assigned only to Celsius and Fahrenheit), 2 TextBoxes (each one of them assigned only to Celsius and Fahrenheit), only 1 Convert Button, 1 Clear Button, and 1 Exit Button. Also, 1 Error message label which will display the error messages. The application should only allow the user to enter the desired temperature just in one of the TextBoxes...

  • Temperature Converter Create a temperature conversion program that will convert the following to Fahrenheit: Celsius Kelvin...

    Temperature Converter Create a temperature conversion program that will convert the following to Fahrenheit: Celsius Kelvin Newton Your program should take a character which represents the temperature to convert from and a value to be converted to using the following specification: C - Celsius K - Kelvin N - Newton In addition your program should take in the following character to exit the program: X - eXit the program The numeric input for your program should be of type double....

  • Write a program that would ask the user to enter an input file name, and an...

    Write a program that would ask the user to enter an input file name, and an output file name. Then the program reads the content of the input file, and read the data in each line as a number (double). These numbers represent the temperatures degrees in Fahrenheit for each day. The program should convert the temperature degrees to Celsius and then writes the numbers to the output file, with the number of day added to the beginning of the...

  • FOR PYTHON Write a Python program that can convert a Fahrenheit temperature to Celsius, or vice...

    FOR PYTHON Write a Python program that can convert a Fahrenheit temperature to Celsius, or vice versa. The program should use two custom functions, f_to_c and c_to_f, to perform the conversions. Both of these functions should be defined in a custom module named temps. Custom functionc_to_f should be a void function defined to take a Celsius temperature as a parameter. It should calculate and print the equivalent Fahrenheit temperature accurate to three decimal places. Custom function f_to_c should be a...

  • Python 3. Can anyone please help me with these two homework using Python 3. Thanks in...

    Python 3. Can anyone please help me with these two homework using Python 3. Thanks in advance 8. Tip, Tax, and Total Write a program that calculates the total amount of a meal purchased at a restaurant. The program should ask the user to enter the charge for the food, and then calculate the amount of a 15 percent tip and 7 percent sales tax. Display each of these amounts and the total. 9. Celsius to Fahrenheit Temperature Converter Write...

  • In Python, write a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is as...

    In Python, write a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is as follows: F=(9/5)C+32 The program should ask the user to enter a temperature in Celsius, then display the temperature converted to Fahrenheit.

  • Write a Python program that can convert a Fahrenheit temperature to Celsius, or vice versa. The...

    Write a Python program that can convert a Fahrenheit temperature to Celsius, or vice versa. The program should use two custom functions, f_to_c and c_to_f, to perform the conversions. Both of these functions should be defined in a custom module named temps. Custom function c_to_f should be a void function defined to take a Celsius temperature as a parameter. It should calculate and print the equivalent Fahrenheit temperature accurate to three decimal places. Custom function f_to_c should be a value-returning...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT