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...

  • (in python) Write a GUI application that converts Celsius temperatures to Fahrenheit temperatures. The user s......

    (in python) Write a GUI application that converts Celsius temperatures to Fahrenheit temperatures. The user s... Write a GUI application that converts Celsius temperatures to Fahrenheit temperatures. The user should be able to enter a Celsius temperature, click a button, and then see the equivalent Fahrenheit temperature. Use the following formula to make the conversion ( F=9/5 C + 32) where F is the Fahrenheit temperature and C is the Celsius temperature

  • Write a Python program with a function that will take as input from the user the...

    Write a Python program with a function that will take as input from the user the temperature in Celsius and will convert and display temperature values in both Fahrenheit and Celsius, using the equation: F = (C ∗ 9/5)+ 32 Note: below is what a sample input line to your program should look like and the resulting output. User input lines always start with >>>. This convention will be used for all of the problem sets. >>>Enter temperature in Celsius:...

  • 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...

  • Write a C++ program that shows the following menu options and lets the user to convert...

    Write a C++ program that shows the following menu options and lets the user to convert from Metric to Imperial system: Converter Toolkit --------------------     1. Temperature Converter     2. Distance Converter     3. Weight Converter     4. Quit If the user enters 1, the program should ask for the temperature in Celsius and convert it to Fahrenheit If the user enters 2, the program should ask for the distance in Kilometer and convert it to Mile If the user...

  • 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....

  • in Python, prompt the user to enter the temperature to convert to Celsius. Hint, you will...

    in Python, prompt the user to enter the temperature to convert to Celsius. Hint, you will need input() and data type conversion to convert the value that input function returns to integer or float. See the last slide of chapter 2, it includes a sample program of the floor conversion. Sample program: Enter temperature in Celsius: >>> 64 64 in Fahrenheit is 17.7 in Celsius

  • Using python, write a program that lets the user enter this information: First name & Last...

    Using python, write a program that lets the user enter this information: First name & Last name weight age gender height systolic & diastolic blood pressure body temperature in Fahrenheit After the information has been entered, the results should be printed on the display based on the information below -BMI -Temp Conversion -Mean blood pressure -weight conversion (lbs to kg) -height conversion (inches to cm) The output should look like: First Name Last name is ___ cm and ____kgs. First...

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