1 of 4

Assignment 13

Using the provided link as lesson and template, modify the program so that it converts

Celsius to Fahrenheit AND Fahrenheit to Celsius

After watching the Lesson Video, I recommend you recreate the program by typing it out in Pycharm.

This will help you get a good start on your assignment.

By modifying the mileage program, you will find it much easier to complete the temperature conversion program.

When you are finished, your program, it

should look like this when you run it.

2 of 4

When you put in the values of 100 and 21, your result should be as follows.

3 of 4

Start with the mileage program outlined in the video lesson.

Use the simpler get() method to retrieve the value from the entry box(es)

Cast the value that you get from the entry box(es) as a float.

Research the formula for converting between Celsius and Fahrenheit.

Round your result to two decimal places.

Create an fString statement that summarizes the output and assign it to a String variable

Use the config function to write the values to your labels. (See code example below)

You will probably have to do some code syntax research to accomplish all the tasks

that this assignment calls for. As we progress through the course, I am setting tasks that require more initiative and thinking on your part. This will take more time and effort. Don’t Procrastinate!

4 of 4

You will probably have to do some code syntax research to accomplish all the tasks

that this assignment calls for.

As we progress through the course, I am setting tasks that require more initiative and thinking on your part. This will take more time and effort. Don’t Procrastinate!

As a general rule, please put default values into your entry boxes when submitting assignments.

Using values that generate a known output lets you(and me) know that the program is working properly.

It also helps me when marking a lot of assignments as I don’t have to put in the values myself.

import tkinter as tk

root = tk.Tk()

root.geometry("200x100")

textBox = tk.Entry(root)

textBox.insert(0, "This is the default text")

textBox.pack()

root.mainloop()