Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that converts distances mesured in kilometers to miles. One kilometer is approzimately 0.62 miles. Based off of this program.. # convert_gui.pyw #

Write a program that converts distances mesured in kilometers to miles. One kilometer is approzimately 0.62 miles.

Based off of this program..

# convert_gui.pyw # Program to convert Celsius to Fahrenheit using a simple # graphical interface. from graphics import * def main(): win = GraphWin("Celsius Converter", 400, 300) win.setCoords(0.0, 0.0, 3.0, 4.0) # Draw the interface Text(Point(1,3), " Celsius Temperature:").draw(win) Text(Point(1,1), "Fahrenheit Temperature:").draw(win) input = Entry(Point(2,3), 5) input.setText("0.0") input.draw(win) output = Text(Point(2,1),"") output.draw(win) button = Text(Point(1.5,2.0),"Convert It") button.draw(win) Rectangle(Point(1,1.5), Point(2,2.5)).draw(win) # wait for a mouse click win.getMouse() # convert input celsius = eval(input.getText()) fahrenheit = 9.0/5.0 * celsius + 32 # display output and change button output.setText(fahrenheit) button.setText("Quit") # wait for click and then quit win.getMouse() win.close() main() 

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

=+17.14. 1 Extend the ideas in the preceding two problems to R *.

Answered: 1 week ago

Question

1.Mr. Cappa:"Okay, its $2.25 per pie -now, what's the answer?"

Answered: 1 week ago