EBK STARTING OUT WITH PYTHON
EBK STARTING OUT WITH PYTHON
3rd Edition
ISBN: 9780133743661
Author: GADDIS
Publisher: PEARSON CUSTOM PUB.(CONSIGNMENT)
Expert Solution & Answer
Book Icon
Chapter 13, Problem 2AW

Explanation of Solution

Algorithm:

  • • Create the instance of the class using “__init__” method.
  • • Create a root widget using “self.main_window”.
  • • Declare two labels that specify the argument to display the text that is required and specify to which widget it should be displayed.
  • • Call the Label widget’s “pack” method which is positioned as far as left.
  • • Call the “tkinter” module “mainloop” method.

Sample code:

# Program to display the two labels within parent widgets

import tkinter

# Define a class

class MyGUI:

# Define method

  def __init__(self):

         # Create a window widget

         self.main_window = tkinter.Tk()

         # Create two widgets Label with the text.

         self...

Blurred answer
Students have asked these similar questions
Write a statement that creates a Frame widget. Its parent should be self.main_ window.
12. Solar System. In Python,use a Canvas widget to draw each of the planets of our solar system. Draw the sun first, then each planet according to distance from the sun (Mercury, Venus, Earth, Mars, Jupiter Saturn, Uranus, Neptune, and the dwarf planet, Pluto). Label each planet using the create_text method.
Picture card: Create a picture card that looks SIMILAR to this. There are images available in the "images" directory to assist you in making this card. They are not the same images, but there is an image of a desert and a person. Picture card In this screenshot, the title is "Title goes here", the secondary text is "Secondary text", and the body text is "Greyhound divisively hello coldly wonderfully marginally far upon excluding." The card's root element is a with a class of "card". The card is 344px wide. The desert picture is 194px tall. The padding between the body text and everything else is 16px. The color of the title text is #000. The color of the secondary and body texts is #232F34. The size of the person picture is 40px in diameter. The size of the body text is 11px. The size of the title is 22px. For the padding or margin around any other elements, use your best judgment to make it look like the screenshot.

Chapter 13 Solutions

EBK STARTING OUT WITH PYTHON

Ch. 13.7 - Prob. 11CPCh. 13.7 - Prob. 12CPCh. 13.7 - Prob. 13CPCh. 13.7 - Prob. 14CPCh. 13.8 - You want the user to be able to select only one...Ch. 13.8 - You want the user to be able to select any number...Ch. 13.8 - How can you use an Intvar object to determine...Ch. 13.8 - Prob. 18CPCh. 13 - The ________ is the part of a computer with which...Ch. 13 - Before GUIs became popular, the interface was the...Ch. 13 - A ________ is a small window that displays...Ch. 13 - Prob. 4MCCh. 13 - An item that appears in a programs graphical user...Ch. 13 - You can use this module in Python to create GUI...Ch. 13 - Prob. 7MCCh. 13 - Prob. 8MCCh. 13 - This widget is a container that can hold other...Ch. 13 - Prob. 10MCCh. 13 - A(n) ________ is a function or method that is...Ch. 13 - Prob. 12MCCh. 13 - You can call this method to close a GUI program....Ch. 13 - You call this method to retrieve data from an...Ch. 13 - Prob. 15MCCh. 13 - If there are a group of these in a container, only...Ch. 13 - Prob. 1TFCh. 13 - Prob. 2TFCh. 13 - The data that you retrieve from an Entry widget is...Ch. 13 - Prob. 4TFCh. 13 - Prob. 5TFCh. 13 - Prob. 1SACh. 13 - Prob. 2SACh. 13 - Prob. 3SACh. 13 - Prob. 4SACh. 13 - Prob. 5SACh. 13 - Prob. 6SACh. 13 - Prob. 7SACh. 13 - How can you use an IntVar object to determine...Ch. 13 - Prob. 9SACh. 13 - Prob. 1AWCh. 13 - Prob. 2AWCh. 13 - Prob. 3AWCh. 13 - Prob. 4AWCh. 13 - Write a statement that creates a Button widget....Ch. 13 - Write a statement that creates a Button widget...Ch. 13 - Assume the variable data_entry references an Entry...Ch. 13 - Name and Address The Name and Address Problem...Ch. 13 - Latin Translator Look at the following list of...Ch. 13 - Miles Per Gallon Calculator Write a GUI program...Ch. 13 - Celsius to Fahrenheit Write a GUI program that...Ch. 13 - Property Tax A county collects property taxes on...Ch. 13 - Joes Automotive Joes Automotive performs the...Ch. 13 - Long-Distance Calls A long-distance provider...
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    CMPTR
    Computer Science
    ISBN:9781337681872
    Author:PINARD
    Publisher:Cengage
    Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
    Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781305480537
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
CMPTR
Computer Science
ISBN:9781337681872
Author:PINARD
Publisher:Cengage
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT