Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Output

Code
Explanation:

CheckButton Widgets for Temperature Scale

• Two Checkbutton widgets are created for selecting the temperature scale, one
for Celsius and one for Fahrenheit.
• These buttons are packed into the main window using the pack() method.

Scale Widget for Temperature Value

• Scale widget is used to create a slider to select a temperature value.


• The from_ parameter sets the minimum value of the scale.
• The to parameter sets the maximum value of the scale.
• orient=HORIZONTAL specifies that the scale should be horizontal.
• The scale widget is then packed into the main window.

Label Widget

• Label widget creates a label to display some text.


• The label with the text "Converted Temperature" is packed into the main window.

Entry Widget for Displaying Converted Temperature

• Entry widget creates a single-line text entry field.


• The entry widget is packed into the main window.

RadioButton Widgets for Conversion Selection

• Two Radiobutton widgets are created for selecting the conversion type, one for
Celsius and one for Fahrenheit.
• These buttons are packed into the main window.

Button Widget for Conversion

• Button widget creates a button that can trigger an action when clicked.
• The button with the text "Convert" is packed into the main window.

You might also like