

Only programmers (the 1%) use a TUI (and also a GUI) Most beginning programmers program to a TUI, not a GUIĩ Programming a GUI Most modern programming languages (like Python and Java) include packages or modules for programming a GUI In Python, this module is called tkinter The model of computation for a GUI program is more complex than that of a TUI programġ0 Models of Computation TUI GUI Obtain user inputs Perform computations

Supports input via the keyboard Can output text and also graphical shapes representing desktop elements, such as windows, command buttons, data fields, and drop-down menus (also called “widgets”) Supports direct manipulation of desktop elements via the mouse or touchscreenĨ TUI vs GUI Non-programmers (the 99%) do not use a TUI, they use a GUI Supports input via the keyboard and output via the monitor In Python, the I/O functions are input and print import math radius = float(input('Enter the radius: ')) area = math.pi * radius ** 2 print('The area is', area)Ħ Problems with a TUI Must enter inputs in a certain orderĬannot back up to correct input mistakes or change one’s mind Must re-enter all inputs to change just one I/O restricted to text ZUI (zoomable user interface) GUI (graphical user interface) TUI (terminal-based user interface) Inputs UI Computation Outputs
#PYTHON EASYFRAME SET COLOR SOFTWARE#
1 Computer Science 112 Fundamentals of Programming II User InterfacesĪ set of hardware devices (touch screen, monitor, keyboard, mouse, microphone, speakers) Software (input/output functions) Allows human beings to use a computer effectively Inputs UI Computation Outputs
