This workbook is designed to give students an introduction to creating GUIs in Python 3. Before attempting this activity students should have some experience of programming in Python 3.
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
150 views
Creating A GUI in Python 3
This workbook is designed to give students an introduction to creating GUIs in Python 3. Before attempting this activity students should have some experience of programming in Python 3.
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5
Graphical User Interface
You will be used to using programs that have a graphical user
interface (GUI). So far you have been writing programs that have a command line interface (CLI). Now you are going to learn how to develop programs with a GUI using Python. Python uses a library or add-on called Tkinter to create GUIs. Task 1 Start a new Python program and enter the code shown below: Creates a new text box containing the text Computer. Add the text box to the screen. Task 2 Add these three lines of code to your program. What do the new lines do? Task 3 Start a new Python program and enter the code shown below: Adds a text entry box to the screen. This function is called when the button is pressed. Adds a button to the screen. Task 4 Start a new Python program and enter the code shown below: The inputted numbers are converted to integers for the calculation.