Introduction to Programming using Python 1st Edition

Published by Pearson
ISBN 10: 0132747189
ISBN 13: 978-0-13274-718-9

Chapter 9 - GUI Programming using Tkinter - Section 9.4 - The Widget Classes - Check Point - MyProgrammingLab - Page 280: 9.12

Answer

Here is an example of how you can display the values defined by the named constants LEFT, CENTER, and RIGHT in the Tkinter module: import tkinter as tk print("LEFT value:", tk.LEFT) print("CENTER value:", tk.CENTER) print("RIGHT value:", tk.RIGHT)

Work Step by Step

In this code, we import the Tkinter module as tk and use the print statement to display the values of LEFT, CENTER, and RIGHT. These constants define the horizontal alignment of text and widgets within their parent widget and have the values tk.LEFT, tk.CENTER, and tk.RIGHT, respectively.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.