bembry.org
Home / Technology / Python / Exercises

Tkinter Lesson 2 Exercises: Placing Widgets in a GUI

Each assignment should omit the root.mainloop() method call at the end of the code. Also, each program must include a title for the window. Save these programs as tk2-1.py, tk2-2.py, etc.

Exercise 1:
Create the GUI for a basic caluclator.

Exercise 2:
Create the GUI for a voting program. The program should have a list of five options, with a button beside each option to vote for it.

Exercise 3:
Create a GUI for a program that lets you change your password. The program should ask for the old password, the new password, and confirmation of the new password. The GUI should include a button for submitting the change to the original program. Note that all the password entries should be hidden.

Exercise 4:
Create the GUI for a program that collects a user's personal information. The GUI should have entries for First Name, Last Name, Address, City, State, Zip, Phone, and Email, as well as a button for submitting the information to the main program.

Lesson Exercises Python Lessons Homepage

Restricted access