Tkinter Part II: Buttons, Lambda & Dynamic Content
|
|
- Angel Holt
- 6 years ago
- Views:
Transcription
1 Tkinter Part II: Buttons, Lambda & Dynamic Content July 8, 2015 Brian A. Malloy Slide 1 of 11
2 1. We further investigate Labels and Buttons and hook Python actions to these widgets. We present lambda functions, useful in GUIs We show how to bind keystrokes and mouse events to Python code In Part III we examine Frames to help with layout management, and show some additional Tkinter widgets. Slide 2 of 11
3 2. 1 import Tkinter as tk 2 counter = 0 3 def counterlabel(label): 4 def count(): 5 global counter 6 counter += 1 7 label.config(text=str(counter)) 8 label.after(1000, count) 9 count() root = tk.tk() 12 root.title("second Timer") 13 label = tk.label(root, fg="green") 14 label.pack() 15 counterlabel(label) 16 button = tk.button(root, text= Stop, \ width=25, command=root.destroy) 17 button.pack() 18 root.mainloop() Slide 3 of 11
4 2.1. Explained Line #12 sets the title of the window Line #13 instantiates a Label Line #16 instantiates a Button Line #15 calls function counterlabel which: 1. calls count on line #9 2. count updates global counter (line #6) 3. count schedules the next call to count using a method in Label, after, which takes 2 parameters: (1) the delay, and (2) the function to call after the delay. (line #8) Slide 4 of 11
5 2.2. Connecting Widgets with Code On line #7 the text in the Label widget is updated every 1000 milliseconds, which is every second. On line #16, a Button is instantiated, including the command to be executed when the button is pushed. That command is root.destroy destroy terminates the mainloop and deletes all widgets As an exercise, convert the Timer program so that it uses a class. Slide 5 of 11
6 3. 1 import Tkinter as tk 2 class App: 3 def init (self, master): 4 self.button = tk.button(master, 5 text="quit", fg="red", 6 command=master.quit) 7 self.button.pack(side=tk.left) 8 self.slogan = tk.button(master, text="hello", 9 command=self.writeslogan) 10 self.slogan.pack(side=tk.left) 11 def writeslogan(self): 12 print "Tkinter is easy to use!" root = tk.tk() 15 app = App(root) 16 root.mainloop() Slide 6 of 11
7 3.1. Buttton Class Explained In this example we package the GUI in a class: App We pass root to the constructor Line #6 connects the code master.quit to the button, which stops the tk interpreter Line #9 connects the code in writeslogan to the slogan button. Slide 7 of 11
8 4. The lambda operator is a way to create small, anonymous functions. They are dixie cup functions that you only use once where they are created. Syntax: lambda argument list: expression Example: >>> f = lambda x, y : x + y >>> f(1,1) 2 Slide 8 of 11
9 5. 1 import Tkinter as tk 2 GEOMETRY = 300x def callback(event): 4 print event.x, event.y 5 6 root = tk.tk() 7 root.geometry(geometry) 8 root.title("my First Button") 9 root.bind( <Escape>, (lambda event: root.quit())) 10 myfont = ( symbol, 12) label = tk.label(root, font = myfont, text="hello") 13 label.config(relief=tk.raised) 14 label.config(width=25, height=5, bg="#00ff00", bd=5) 15 label.pack(side=tk.top, padx=5, pady=5) 16 label.bind("<button>", callback) 17 root.mainloop() Slide 9 of 11
10 5.1. What Does The figure shows the widgets on the right, and the output of the program on the left. The output representes the (x, y) coordinates of the mouse when the left mouse button is clicked. The program terminates when the escape key is pressed in the green Label. Slide 10 of 11
11 5.2. Key Bind Explained Lines #2 & #7 set size & position of the tk window; size is 300x300, position is (200, 60) Line #9 binds the escape key to a lambda function that terminates the tk program. Line #10 sets the font Line #13 sets the relief of the Label widget. Line #14 uses hex to set the background color to green, and sets the border (bd) to be 5 pixels. Line #16 binds the left mouse button to the function on line #3, callback; we pass the mouse event to the callback function so it can print the mouse coordinates at the time of the left button click. Slide 11 of 11
Mid Unit Review. Of the four learning outcomes for this unit, we have covered the first two. 1.1 LO1 2.1 LO2 LO2
Lecture 8 Mid Unit Review Of the four learning outcomes for this unit, we have covered the first two. LO Learning outcome (LO) AC Assessment criteria for pass The learner can: LO1 Understand the principles
More informationLevel 3 Computing Year 2 Lecturer: Phil Smith
Level 3 Computing Year 2 Lecturer: Phil Smith We looked at: Debugging Previously BTEC Level 3 Year 2 Unit 16 Procedural programming Now Now we will look at: GUI applications. BTEC Level 3 Year 2 Unit 16
More informationProgramming Training. This Week: Tkinter for GUI Interfaces. Some examples
Programming Training This Week: Tkinter for GUI Interfaces Some examples Tkinter Overview Set of widgets designed by John K. Ousterhout, 1987 Tkinter == Tool Kit Interface Mean to be driven by Tcl (Toolkit
More informationTeaching London Computing
Teaching London Computing A Level Computer Science Programming GUI in Python William Marsh School of Electronic Engineering and Computer Science Queen Mary University of London How the Session Works Outline
More informationTkinter: Input and Output Bindings. Marquette University
Tkinter: Input and Output Bindings Marquette University Tkinter Variables Tkinter contains a useful mechanism to connect widgets to variables This allows us to have variables change when widgets do and
More informationThis text is used together with Mark Pilgrims book Dive Into Python 3 for the Arthead course Python Fundamentals.
2 About this text This text is used together with Mark Pilgrims book Dive Into Python 3 for the Arthead course Python Fundamentals. The first part is written for Python 2 and at the end there is a section
More informationApplication Note: Creating a Python Graphical User Interface. Matthew Roach March 31 st, 2014
Application Note: Creating a Python Graphical User Interface Matthew Roach March 31 st, 2014 Abstract: This document contains 2 portions. First, it provides an introduction into phase and the use of phase
More informationENGR/CS 101 CS Session Lecture 15
ENGR/CS 101 CS Session Lecture 15 Log into Windows/ACENET (reboot if in Linux) Use web browser to go to session webpage http://csserver.evansville.edu/~hwang/f14-courses/cs101.html Right-click on lecture15.py
More informationCS2021 Week #6. Tkinter structure. GUI Programming using Tkinter
CS2021 Week #6 GUI Programming using Tkinter Tkinter structure Requires integra>on with Tk a GUI library Python program makes widgets and registers func>ons to handle widget events Program consist of theses
More informationSelected GUI elements:
Selected GUI elements: Element tkinter Class Description Frame Frame Holds other GUI elements Label Label Displays uneditable text or icons Button Button Performs an action when the user activates it Text
More informationCIS192 Python Programming
CIS192 Python Programming Graphical User Interfaces Robert Rand University of Pennsylvania November 19, 2015 Robert Rand (University of Pennsylvania) CIS 192 November 19, 2015 1 / 20 Outline 1 Graphical
More informationA GUI for DFT and Orthogonal DWT in Tkinter
A GUI for DFT and Orthogonal DWT in Tkinter Tariq Javid Ali, Pervez Akhtar, Muhammad Faris Hamdard Institute of Engineering & Technology Hamdard University Karachi-74600, Pakistan Email: {tariq.javid pervez.akhtar
More informationCAS London CPD Day February 16
Practical Sheet: GUI Programming This sheet is a set of exercises for introducing GUI programming in Python using Tkinter, assuming knowledge of basic Python programming. All materials are at http://www.eecs.qmul.ac.uk/~william/cas-london-2016.html
More informationCS 112 Project Assignment: Visual Password
CS 112 Project Assignment: Visual Password Instructor: Dan Fleck Overview In this project you will use Python to implement a visual password system. In the industry today there is ongoing research about
More informationCS 112: Intro to Comp Prog
CS 112: Intro to Comp Prog Tkinter Layout Managers: place, pack, grid Custom Frames Widgets In-depth StringVar tkfont Upcoming Tk To use Tkinter Widgets (components: buttons, labels, etc). You must import
More informationAbout 1. Chapter 1: Getting started with pyqt5 2. Remarks 2. Examples 2. Installation or Setup 2. Hello World Example 6. Adding an application icon 8
pyqt5 #pyqt5 Table of Contents About 1 Chapter 1: Getting started with pyqt5 2 Remarks 2 Examples 2 Installation or Setup 2 Hello World Example 6 Adding an application icon 8 Showing a tooltip 10 Package
More informationPython for Scientific Computations and Control
Python for Scientific Computations and Control 1 Python for Scientific Computations and Control Project Report Georg Malte Kauf Python for Scientific Computations and Control 2 Contents 1 Introduction
More information# arrange Label in parent widget
Much of today s software uses a point-and-click graphical user interface (GUI). The standard library modules Tkinter and Tix allow for portable, event-driven, GUI development in Python. A Python/Tkinter
More informationTcl/Tk lecture. What is the Wish Interpreter? CIS 410/510 User Interface Programming
Tcl/Tk lecture CIS 410/510 User Interface Programming Tool Command Language TCL Scripting language for developing & using GUIs Allows generic programming variables, loops, procedures Embeddable into an
More informationLecture 3 - Overview. More about functions Operators Very briefly about naming conventions Graphical user interfaces (GUIs)
Lecture 3 - Overview More about functions Operators Very briefly about naming conventions Graphical user interfaces (GUIs) Function parameters Passed by reference, but the standard implication that the
More informationGraphical User Interfaces
to visualize Graphical User Interfaces 1 2 to visualize MCS 507 Lecture 12 Mathematical, Statistical and Scientific Software Jan Verschelde, 19 September 2011 Graphical User Interfaces to visualize 1 2
More informationFundamentals of Programming. Functions Redux. Event-based Programming. File and Web IO. November 4th, 2014
15-112 Fundamentals of Programming Functions Redux. Event-based Programming. File and Web IO. November 4th, 2014 Today Briefly show file and web IO. Revisit functions. Learn a bit more about them. Event-based
More informationEasy Graphical User Interfaces
Easy Graphical User Interfaces with breezypythongui Types of User Interfaces GUI (graphical user interface) TUI (terminal-based user interface) UI Inputs Outputs Computation Terminal-Based User Interface
More informationThinking in Tkinter. Thinking in Tkinter. by Stephen Ferg ferg.org) revised:
1 of 53 Thinking in Tkinter by Stephen Ferg (steve@ ferg.org) revised: 2005-07-17 This file contains the source code for all of the files in the Thinking in Tkinter series. If you print this file with
More informationPTN-202: Advanced Python Programming Course Description. Course Outline
PTN-202: Advanced Python Programming Course Description This 4-day course picks up where Python I leaves off, covering some topics in more detail, and adding many new ones, with a focus on enterprise development.
More informationPart 3. Useful Python
Part 3 Useful Python Parts one and two gave you a good foundation in the Python language and a good understanding of software design. You ve built some substantial applications, and hopefully you ve built
More informationCIS192 Python Programming
CIS192 Python Programming User Interfaces (Graphical and Text) Eric Kutschera University of Pennsylvania March 20, 2015 Eric Kutschera (University of Pennsylvania) CIS 192 March 20, 2015 1 / 23 Final Project
More informationLecture 3 - Overview. Object-oriented programming and classes Operators Very briefly about naming conventions Graphical user interfaces (GUIs)
Lecture 3 - Overview Object-oriented programming and classes Operators Very briefly about naming conventions Graphical user interfaces (GUIs) Object-oriented philosophy Object = Data + Algorithm An object
More informationGraphical user interface software
Graphical user interface software what the user sees and uses examples of GUI-building systems HTML, CSS, Javascript (jquery, Dojo, YUI, XUL,...) Flash, Silverlight,... X Window system, GTk Tcl/Tk, with
More informationNoughts and Crosses. Step 1: Drawing the grid. Introduction
6 Noughts and Crosses These projects are for use inside the UK only. All Code Clubs must be registered. You can check registered clubs at www.codeclub.org.uk/. This coursework is developed in the open
More information""" helloio.py illustrate form IO (still procedural) works, but bad design: no main function """ from Tkinter import *
helloio.py illustrate form IO (still procedural) works, but bad design: no main function app = Tk() lbloutput = Label(app, text = "type your name") lbloutput.grid() txtinput = Entry(app) txtinput.grid()
More informationCS 2316 Exam 3 Fall 2011
CS 2316 Exam 3 Fall 2011 Name : 1. (2 points) Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking
More informationCS 2316 Exam 3 Spring 2013
CS 2316 Exam 3 Spring 2013 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More informationWhen to use the Grid Manager
第 1 页共 5 页 2015/6/8 8:02 back next The Grid geometry manager puts the widgets in a 2-dimensional table. The master widget is split into a number of rows and columns, and each cell in the resulting table
More informationPython GUIs. $ conda install pyqt
PyQT GUIs 1 / 18 Python GUIs Python wasn t originally desined for GUI programming In the interest of "including batteries" the tkinter was included in the Python standard library tkinter is a Python wrapper
More informationOutline. general information policies for the final exam
Outline 1 final exam on Tuesday 5 May 2015, at 8AM, in BSB 337 general information policies for the final exam 2 some example questions strings, lists, dictionaries scope of variables in functions working
More informationCS 2316 Exam 3 Summer 2014
CS 2316 Exam 3 Summer 2014 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More informationThis course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.
HTML5/CSS3/JavaScript Programming Course Summary Description This class is designed for students that have experience with basic HTML concepts that wish to learn about HTML Version 5, Cascading Style Sheets
More informationChapter 9 GUI Programming Using Tkinter. Copyright 2012 by Pearson Education, Inc. All Rights Reserved.
Chapter 9 GUI Programming Using Tkinter 1 Motivations Tkinter is not only a useful tool for developing GUI projects, but also a valuable pedagogical tool for learning object-oriented programming. 2 Objectives
More informationGraphical User Interfaces
Graphical User Interfaces 1 User Interfaces GUIs in Python with Tkinter object oriented GUI programming 2 Mixing Colors specification of the GUI the widget Scale 3 Simulating a Bouncing Ball layout of
More informationIntroducing Motif. Motif User s Guide 1
Introducing Motif Motif is a software system that provides you with a great deal of control over the appearance of your computer s visual display. This introductory chapter provides information on the
More informationUser Interfaces. getting arguments of the command line a command line interface to store points fitting points with polyfit of numpy
User Interfaces 1 Command Line Interfaces getting arguments of the command line a command line interface to store points fitting points with polyfit of numpy 2 Encapsulation by Object Oriented Programming
More informationGraphics: Legacy Library
Graphics: Legacy Library Version 5.1 February 14, 2011 (require graphics/graphics) The viewport graphics library is a relatively simple toolbox of graphics commands. The library is not very powerful; it
More informationPython. Easiest to Highest. PART 1: Python Element
Easiest to Highest Python All rights reserved by John Yoon at Mercy College, New York, U.S.A. in 2017 PART 1: Python Element 1. Python Basics by Examples 2. Conditions and Repetitions 3. Data Manipulation
More informationtkstuff Documentation
tkstuff Documentation Release 0.2 Simon Kennedy Mar 21, 2018 Contents 1 Gallery 1 2 Code Examples 7 3 Date Handling 9 4 Time Handling 11 5 Color Handling 13 6 Filesystem Entry Handling 17 7 Password Handling
More information[CHAPTER] 1 INTRODUCTION 1
FM_TOC C7817 47493 1/28/11 9:29 AM Page iii Table of Contents [CHAPTER] 1 INTRODUCTION 1 1.1 Two Fundamental Ideas of Computer Science: Algorithms and Information Processing...2 1.1.1 Algorithms...2 1.1.2
More informationSliders. If we start this script, we get a window with a vertical and a horizontal slider:
Sliders Introduction A slider is a Tkinter object with which a user can set a value by moving an indicator. Sliders can be vertically or horizontally arranged. A slider is created with the Scale method().
More informationAsynchronous Programming
Asynchronous Programming Turn-in Instructions A main file, called gui.py See previous slides for how to make it main I ll run it from the command line Put in a ZIP file, along with any additional needed
More informationCSc 110, Autumn 2016 Lecture 7: Graphics. Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Autumn 2016 Lecture 7: Graphics Adapted from slides by Marty Stepp and Stuart Reges Graphical objects We will draw graphics in Python using a new kind of object: DrawingPanel: A window on the
More informationCSE : Python Programming
CSE 399-004: Python Programming Lecture 08: Graphical User Interfaces with wxpython March 12, 2005 http://www.seas.upenn.edu/~cse39904/ Plan for today and next time Today: wxpython (part 1) Aside: Arguments
More informationGetting Started p. 1 Obtaining Tcl/Tk p. 1 Interactive Execution p. 1 Direct Execution p. 4 Reading this Book p. 6 Requirements for Networking
Foreword p. xi Acknowledgments p. xiii Getting Started p. 1 Obtaining Tcl/Tk p. 1 Interactive Execution p. 1 Direct Execution p. 4 Reading this Book p. 6 Requirements for Networking Examples p. 7 Requirements
More informationYour (printed!) Name: CS 1803 Exam 2. Grading TA / Section: Monday, Oct 25th, 2010
Your (printed!) Name: CS 1803 Exam 2 Grading TA / Section: Monday, Oct 25th, 2010 INTEGRITY: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate
More informationGraphical User Interfaces
Chapter 14 Graphical User Interfaces So far, we have developed programs that interact with the user through the command line, where the user has to call a Python program by typing its name and adding the
More informationQuestion Possible Points Earned Points Graded By GUI 22 SQL 24 XML 20 Multiple Choice 14 Total Points 80
CS 1803 Spring 2011 Exam 3 KEY Name: Section: Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking
More informationLearning outcomes. COMPSCI 101 Principles of Programming. Drawing 2D shapes using Characters. Printing a Row of characters
Learning outcomes At the end of this lecture, students should be able to draw 2D shapes using characters draw 2D shapes on a Canvas COMPSCI 101 Principles of Programming Lecture 25 - Using the Canvas widget
More informationuser's guide Author : Matías Guijarro Date : 18/06/04
SpecClient user's guide Author : Matías Guijarro Date : 18/06/04 Contents 1. Introduction... 3 1.1 History... 3 1.2 Features... 3 2. Getting started... 4 2.1 Importing SpecClient... 4 2.2 Moving a motor...
More informationIntroduction to Programming Using Python Lecture 6. Dr. Zhang COSC 1437 Spring, 2018 March 01, 2018
Introduction to Programming Using Python Lecture 6 Dr. Zhang COSC 1437 Spring, 2018 March 01, 2018 Chapter 9 GUI Programming Using Tkinter Getting started with Tkinter with a simple example. Code example:
More informationProgramming in Python
COURSE DESCRIPTION This course presents both the programming interface and the techniques that can be used to write procedures in Python on Unix / Linux systems. COURSE OBJECTIVES Each participant will
More informationPython GUI Programming (Tkinter)
Python GUI Programming (Tkinter) Python provides various options for developing graphical user interfaces (GUIs). Most important are listed below: 1. Tkinter: Tkinter is the Python interface to the Tk
More informationThe Racket Graphical Interface Toolkit
The Racket Graphical Interface Toolkit Version 6.12.0.2 Matthew Flatt, Robert Bruce Findler, and John Clements January 23, 2018 (require racket/gui/base) package: gui-lib The racket/gui/base library provides
More informationGraphical User Interfaces with Perl/Tk. Event Driven Programming. Structure of an Event-Driven Program. An introduction
Graphical User Interfaces with Perl/Tk An introduction Event Driven Programming In functional programming, what happens when is determined (almost) entirely by the programmer. The user generally has a
More informationOverview. Applets. A Java GUI inside your browser! Important methods Drawing images Playing audio Getting input parameters Double buffering
Java Applets don't panic about frogs!
More informationGlossary. For Introduction to Programming Using Python By Y. Daniel Liang
Chapter 1 Glossary For Introduction to Programming Using Python By Y. Daniel Liang.py Python script file extension name. assembler A software used to translate assemblylanguage programs into machine code.
More informationGraphical User Interface (GUI)
Graphical User Interface (GUI) An example of Inheritance and Sub-Typing 1 Java GUI Portability Problem Java loves the idea that your code produces the same results on any machine The underlying hardware
More informationUsing tcl to Replay Xt Applications
Using tcl to Replay Xt Applications Jan Newmarch Faculty of Information Science and Engineering University of Canberra PO Box 1 Belconnen ACT 2616 email: jan@ise.canberra.edu.au Paper presented at AUUG94,
More informationPlease attribute to : Paul Sutton : :
License : This work is licensed under a Creative Commons Attribution 4.0 International License. Please attribute to : Paul Sutton : http://www.zleap.net : @zleap14 : zleap@zleap.net You are free to: Share
More informationWindows and Events. created originally by Brian Bailey
Windows and Events created originally by Brian Bailey Announcements Review next time Midterm next Friday UI Architecture Applications UI Builders and Runtimes Frameworks Toolkits Windowing System Operating
More informationGraphical User Interface (GUI)
Graphical User Interface (GUI) An example of Inheritance and Sub-Typing 1 Java GUI Portability Problem Java loves the idea that your code produces the same results on any machine The underlying hardware
More informationCSc 110, Spring 2018 Lecture 9: Parameters, Graphics and Random. Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Spring 2018 Lecture 9: Parameters, Graphics and Random Adapted from slides by Marty Stepp and Stuart Reges Exercise: multiple parameters def main(): print_number(4, 9) print_number(17, 6) print_number(8,
More informationINTERPRETERS 8. 1 Calculator COMPUTER SCIENCE 61A. November 3, 2016
INTERPRETERS 8 COMPUTER SCIENCE 61A November 3, 2016 1 Calculator We are beginning to dive into the realm of interpreting computer programs that is, writing programs that understand other programs. In
More informationCS 2316 Homework 9b GT Thrift Shop Due: Wednesday, April 20 th, before 11:55 PM Out of 100 points. Premise
CS 2316 Homework 9b GT Thrift Shop Due: Wednesday, April 20 th, before 11:55 PM Out of 100 points Files to submit: 1. HW9b.py 2. any image files (.gif ) used in database This is an INDIVIDUAL assignment!
More informationAP CS Unit 11: Graphics and Events
AP CS Unit 11: Graphics and Events This packet shows how to create programs with a graphical interface in a way that is consistent with the approach used in the Elevens program. Copy the following two
More informationEmbedded GUI: Widgets Within Editors
Embedded GUI: Widgets Within Editors Version 6.12 Mike T. McHenry January 26, 2018 (require embedded-gui) package: gui-lib The embedded-gui library provides a class hierarchy for creating graphical boxes
More informationMicrosoft Office Excel 2007: Basic. Course Overview. Course Length: 1 Day. Course Overview
Microsoft Office Excel 2007: Basic Course Length: 1 Day Course Overview This course teaches the basic functions and features of Excel 2007. After an introduction to spreadsheet terminology and Excel's
More informationPython Scripting for Computational Science
Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures 43 Springer Table of Contents 1 Introduction... 1 1.1 Scripting versus Traditional Programming... 1 1.1.1
More informationPLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science
PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL/MAY 2009 EXAMINATIONS CSC 108H1S Instructor: Horton Duration 3 hours PLEASE HAND IN Examination Aids: None Student Number: Last (Family)
More informationThreading the Code. Self-Review Questions. Self-review 11.1 What is a thread and what is a process? What is the difference between the two?
Threading the Code 11 Self-Review Questions Self-review 11.1 What is a thread and what is a process? What is the difference between the two? Self-review 11.2 What does the scheduler in an operating system
More informationCS123. Programming Your Personal Robot. Part 2: Event Driven Behavior
CS123 Programming Your Personal Robot Part 2: Event Driven Behavior You Survived! Smooth Sailing Topics 2.1 Event Driven Programming Programming Paradigms and Paradigm Shift Event Driven Programming Concept
More informationCS 170 Java Programming 1. Week 9: Learning about Loops
CS 170 Java Programming 1 Week 9: Learning about Loops What s the Plan? Topic 1: A Little Review ACM GUI Apps, Buttons, Text and Events Topic 2: Learning about Loops Different kinds of loops Using loops
More informationProctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.
QUEEN'S UNIVERSITY SCHOOL OF COMPUTING HAND IN Answers Are Recorded on Question Paper CMPE212, FALL TERM, 2012 FINAL EXAMINATION 18 December 2012, 2pm Instructor: Alan McLeod If the instructor is unavailable
More informationINF 212 ANALYSIS OF PROG. LANGS FUNCTION COMPOSITION. Instructors: Crista Lopes Copyright Instructors.
INF 212 ANALYSIS OF PROG. LANGS FUNCTION COMPOSITION Instructors: Crista Lopes Copyright Instructors. Topics Recursion Higher-order functions Continuation-Passing Style Monads (take 1) Identity Monad Maybe
More information2. (True/False) All methods in an interface must be declared public.
Object and Classes 1. Create a class Rectangle that represents a rectangular region of the plane. A rectangle should be described using four integers: two represent the coordinates of the upper left corner
More informationPython Scripting for Computational Science
Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures Sprin ger Table of Contents 1 Introduction 1 1.1 Scripting versus Traditional Programming 1 1.1.1 Why Scripting
More informationFrTime: A Language for Reactive Programs
FrTime: A Language for Reactive Programs Version 5.3.6 Greg Cooper August 9, 2013 #lang frtime The frtime language supports declarative construction of reactive systems in a syntax very similar to that
More informationGUI Output. Adapted from slides by Michelle Strout with some slides from Rick Mercer. CSc 210
GUI Output Adapted from slides by Michelle Strout with some slides from Rick Mercer CSc 210 GUI (Graphical User Interface) We all use GUI s every day Text interfaces great for testing and debugging Infants
More informationComparing SQLfast code and standard application code. Three examples : data extraction, GUI and file download
Comparing SQLfast code and standard application code Three examples : data extraction, GUI and file download 1. Data extraction In Basic mode, once database ORDERS.db has been opened (button Open DB),
More informationParsing Scheme (+ (* 2 3) 1) * 1
Parsing Scheme + (+ (* 2 3) 1) * 1 2 3 Compiling Scheme frame + frame halt * 1 3 2 3 2 refer 1 apply * refer apply + Compiling Scheme make-return START make-test make-close make-assign make- pair? yes
More informationCS 101 Computer Science I Fall Instructor Muller. stddraw API. (DRAFT of 1/15/2013)
CS 101 Computer Science I Fall 2013 Instructor Muller stddraw API (DRAFT of 1/15/2013) This document describes the application programmer interface (API) for the stddraw library. An API describes the set
More informationName: Partner: Python Activity 9: Looping Structures: FOR Loops
Name: Partner: Python Activity 9: Looping Structures: FOR Loops Learning Objectives Students will be able to: Content: Explain the difference between while loop and a FOR loop Explain the syntax of a FOR
More informationUI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML
UI Course (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) HTML: Introduction The World Wide Web (WWW) and history of HTML Hypertext and Hypertext Markup Language Why HTML Prerequisites Objective
More informationObject-Oriented Programming in C# (VS 2015)
Object-Oriented Programming in C# (VS 2015) This thorough and comprehensive 5-day course is a practical introduction to programming in C#, utilizing the services provided by.net. This course emphasizes
More informationAlgebra Homework Application Nick Hobbs
Algebra Homework Application Nick Hobbs Project Overview: The goal of this project was to create a dynamic math textbook. The application would provide instant feedback to students working on math homework,
More informationBasking in the. by Micah Martin 8th Light, Inc. Copyright 2009 Micah Martin
Basking in the by Micah Martin 8th Light, Inc. Limelight is... (Ruby on the Desktop) Ideas From The Web Ideas From The Web Ideas From The Web Ideas From The Web Theater Metaphor http://jacatering.com/images/theater.jpg
More informationObject-Oriented Programming in C# (VS 2012)
Object-Oriented Programming in C# (VS 2012) This thorough and comprehensive course is a practical introduction to programming in C#, utilizing the services provided by.net. This course emphasizes the C#
More informationAbout this tutorial. The Lianja App Development process
About this tutorial In this tutorial we will see how to build Custom Sections in Visual FoxPro. The target audience is for intermediate developers who have read through and understood the Getting Started
More informationLay-out formatting Cinema 4d Dialog (R13) For this tutorial I used
Lay-out formatting Cinema 4d Dialog (R13) For this tutorial I used http://villager-and-c4d.cocolog-nifty.com/blog/2011/12/c4d-python-r1-1.html. You define the widgets using some common arguments: widget
More informationMA Petite Application
MA Petite Application Carlos Grandón July 8, 2004 1 Introduction MAPA is an application for showing boxes in 2D or 3D The main object is to support visualization results from domain
More informationAl al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department
Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department 0901212 Python Programming 1 st Semester 2014/2015 Course Catalog This course introduces
More informationPython. Easiest to Highest. PART 1: Python Element
Easiest to Highest Python All rights reserved by John Yoon at Mercy College, New York, U.S.A. in 2017 PART 1: Python Element 1. Python Basics by Examples 2. Conditions and Repetitions 3. Data Manipulation
More informationJava Foundations. 9-1 Introduction to JavaFX. Copyright 2014, Oracle and/or its affiliates. All rights reserved.
Java Foundations 9-1 Copyright 2014, Oracle and/or its affiliates. All rights reserved. Objectives This lesson covers the following objectives: Create a JavaFX project Explain the components of the default
More information