Tips and Tricks Beech Hall Teaching Course. A Function A Function is where you can define your own code to do a particular thing – a function Pretty much.

Slides:



Advertisements
Similar presentations
Overloading Having more than one method with the same name is known as overloading. Overloading is legal in Java as long as each version takes different.
Advertisements

If Statement. IF Statements Executing code when one thing happens rather than something else is so common in programming that that the IF Statement has.
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
LIS651 lecture 3 numbers, Boolean, control flow Thomas Krichel
Programming for Beginners
The if-else Statements
Game with US Beginner Tutorial. Welcome!! Who I am What is Processing? Basic Coding Input Methods Images Classes Arrays.
Python Programming Language
Classes  All code in a Java program is part of a class  A class has two purposes  Provide functions to do work for the programmer  Represent data.
16-May-15 Sudden Python Drinking from the Fire Hose.
1 Loops. 2 Often we want to execute a block of code multiple times. Something is always different each time through the block. Typically a variable is.
Title An Introduction to Python. What is Python exactly? Python is a modern rapid development language. Code is very clean and easy to read. Emphasizes.
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
Lecturer: Fintan Costello Welcome to Hdip 001 Introduction to Programming.
Selection Statements choice of one among several blocks of code Java supports 3 kinds of selection statements: if statement – selects one block or leaves.
HTML Recall that HTML is static in that it describes how a page is to be displayed, but it doesn’t provide for interaction or animation. A page created.
KS1 Scratch 1.4 Pizza Pickle - Debugging Programming.
The Ruby Programming Language
Introducing Java.
Hello AP Computer Science!. What are some of the things that you have used computers for?
Coding Methodology How to Design Code. © 2005 MIT-Africa Internet Technology Initiative Pay Attention to Detail When implementing or using APIs details.
Introduction to Java Thanks to Dan Lunney (SHS). Java Basics File names The “main” method Output to screen Escape Sequence – Special Characters format()
CPS120 Introduction to Computer Science Iteration (Looping)
Introduction to MATLAB Session 3 Simopekka Vänskä, THL Department of Mathematics and Statistics University of Helsinki 2011.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #005 (April somthin, 2015)
ENEE150 – 0102 ANDREW GOFFIN Testing and Debugging.
Chapter 0 Getting Started. Objectives Understand the basic structure of a C++ program including: – Comments – Preprocessor instructions – Main function.
Introducing Python CS 4320, SPRING Resources We will be following the Python tutorialPython tutorial These notes will cover the following sections.
Introducing Python CS 4320, SPRING Lexical Structure Two aspects of Python syntax may be challenging to Java programmers Indenting ◦Indenting is.
Dictionaries.   Review on for loops – nested for loops  Dictionaries (p.79 Learning Python)  Sys Module for system arguments  Reverse complementing.
Introduction to Programming JScript Six Scripting functions Discuss functions Password Example.
JAVA Practical Creating our first program 2. Source code file 3. Class file 4. Understanding the different parts of our program 5. Escape characters.
1 Loops II. 2 Recall the while Loop int sum = 0; int i = 1;... /* Sum the integers 1 to 10 */ while ( i
ITM © Port, Kazman 1 ITM 352 How to Think Like a Programmer.
Hello Computer Science!. Below is an example of a Hello World program in JAVA. While it is only three lines of code, there are many things that are happening.
CPS120 Introduction to Computer Science Iteration (Looping)
Session 2: Basic HTML HTML Coding Spring 2009 The LIS Web Team Presents.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Feb 10th, 2009 Introduction to Programming.
Introducing Java Chapter 3 Review. Why Program in Java? Java, is an object-oriented programming language. OOP languages evolved out of the need to better.
Programming Language C++ Lecture 3. Control Structures  C++ provides control structures that serve to specify what has to be done to perform our program.
11 ITI 1120 Lab # 2 Contributors: G. Arbez, M. Eid, D. Inkpen, A. Williams, D. Amyot.
An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)
1 2. Program Construction in Java. 01 Java basics.
Python Flow of Control CS 4320, SPRING Iteration The ‘for’ loop is good for stepping through lists The code below will print each element in the.
CPSC 233 Tutorial January 21 st /22 nd, Linux Commands.
2.1 First C Program. First Program Open visual studio, click new file Save as “programName.c” – Program must start with letter and have no spaces – Must.
CSE 341 Section 1 (9/28) With thanks to Dan Grossman, et. al. from previous versions of these slides.
EQUATION IN TWO VARIABLES:
Compilation and Debugging
Compilation and Debugging
Chapter 4 LOOPS © Bobby Hoggard, Department of Computer Science, East Carolina University / These slides may not be used or duplicated without permission.
Procedures Programming Guides.
Debuggers.
KS1 Scratch 1.4 Pizza Pickle - Debugging
Tonga Institute of Higher Education
Debugging CSCE 121 J. Michael Moore.
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
Debugging at Scale.
Using a Debugger 1-Jan-19.
Selection Statements.
jGRASP editor-syncrasies (idiosyncrasies)
IPC144 Introduction to Programming Using C Week 4 – Lesson 2
Millennium High School Agenda Calendar
Class code for pythonroom.com cchsp2cs
© A+ Computer Science - Basic Java © A+ Computer Science -
Using Your Resources Correctly!
UW CSE 190p Section 6/28, Summer 2012 Dun-Yu Hsiao.
Types, Truth, and Expressions (Part 2)
Evaluating an expression with one variable
Presentation transcript:

Tips and Tricks Beech Hall Teaching Course

A Function A Function is where you can define your own code to do a particular thing – a function Pretty much everything is a function in Processing Functions keep code neater You can steal code and put it in a function

Curly Brackets The Curly Bracket is your friend It can be tricky and they always come in pairs They hate being alone Best to keep your code neat and tidy

Curly Brackets Use the tab to keep things indented if(something is true) { // Use a tab for indents fill(0,255,0); drawBox(1); } Use a Tab

Debugging If you get lost – then use a debug statement to see whats going on The println(“”); command can be used to print the value of any variable – very handy Prints out the value in the area under your code when its running – println(“This variable is: “ + variableName);