CPTR 124 Review for Test 1. Development Tools Editor Similar to a word processor Allows programmer to compose/save/edit source code Compiler/interpreter.

Slides:



Advertisements
Similar presentations
JavaScript I. JavaScript is an object oriented programming language used to add interactivity to web pages. Different from Java, even though bears some.
Advertisements

Primitive Data Types There are a number of common objects we encounter and are treated specially by almost any programming language These are called basic.
Intro to Robots Robots are Everywhere. Intro to Robots Various robots in use today lawnmower pet baby seal for convalescents gutter cleaner home security.
Introduction to Python
Chapter 2 Writing Simple Programs
Geography 465 Assignments, Conditionals, and Loops.
* Note: All of the material for the Required Textbook, Optional Textbook are protected by Copyright Law. * Professor Sana Odeh’s notes and programs listed.
String Escape Sequences
Programming Concepts MIT - AITI. Variables l A variable is a name associated with a piece of data l Variables allow you to store and manipulate data in.
CSC 9010: Natural Language Processing
Python.
INLS 560 – V ARIABLES, E XPRESSIONS, AND S TATEMENTS Instructor: Jason Carter.
1 Identifiers  Identifiers are the words a programmer uses in a program  An identifier can be made up of letters, digits, the underscore character (
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
CS1022 Computer Programming & Principles Lecture 1.2 A brief introduction to Python.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
Input, Output, and Processing
C Derived Languages C is the base upon which many build C++ conventions also influence others *SmallTalk is where most OOP comes Java and Javascript have.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Chapter 2 Elementary Programming
 JAVA Compilation and Interpretation  JAVA Platform Independence  Building First JAVA Program  Escapes Sequences  Display text with printf  Data.
Python Jim Eng Vote on class policy In lecture we discussed several ways in which you might show credits for content in the web pages.
BASICS CONCEPTS OF ‘C’.  C Character Set C Character Set  Tokens in C Tokens in C  Constants Constants  Variables Variables  Global Variables Global.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
CHAPTER 4 GC 101 Data types. DATA TYPES  For all data, assign a name (identifier) and a data type  Data type tells compiler:  How much memory to allocate.
Python uses boolean variables to evaluate conditions. The boolean values True and False are returned when an expression is compared or evaluated.
Variables, Expressions, and Statements
© 2004 Pearson Addison-Wesley. All rights reserved ComS 207: Programming I Instructor: Alexander Stoytchev
Getting Started Java Fundamentals CSC207 – Software Design Summer 2011 – University of Toronto – Department of Computer Science.
Operators and Expressions. 2 String Concatenation  The plus operator (+) is also used for arithmetic addition  The function that the + operator performs.
CSC 1010 Programming for All Lecture 3 Useful Python Elements for Designing Programs Some material based on material from Marty Stepp, Instructor, University.
Jim Havrilla. Invoking Python Just type “python –m script.py [arg]” or “python –c command [arg]” To exit, quit() or Control-D is used To just use the.
Python Let’s get started!.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
1 CS 177 Week 6 Recitation Slides Review for Midterm Exam.
I NTRODUCTION TO PYTHON - GETTING STARTED ( CONT )
Java Basics. Tokens: 1.Keywords int test12 = 10, i; int TEst12 = 20; Int keyword is used to declare integer variables All Key words are lower case java.
Today… Python Keywords. Iteration (or “Loops”!) Winter 2016CISC101 - Prof. McLeod1.
Next Week… Quiz 2 next week: –All Python –Up to this Friday’s lecture: Expressions Console I/O Conditionals while Loops Assignment 2 (due Feb. 12) topics:
© 2004 Pearson Addison-Wesley. All rights reserved August 27, 2007 Primitive Data Types ComS 207: Programming I (in Java) Iowa State University, FALL 2007.
Chapter 2 Writing Simple Programs
G. Pullaiah College of Engineering and Technology
Topics Designing a Program Input, Processing, and Output
Working with Java.
CS1022 Computer Programming & Principles
CS170 – Week 1 Lecture 3: Foundation Ismail abumuhfouz.
Java Variables and Types
Python Let’s get started!.
Primitive Data Types August 28, 2006 ComS 207: Programming I (in Java)
CS-104 Final Exam Review Victor Norman.
Presented By S.Yamuna AP/IT
Statement atoms The 'atomic' components of a statement are: delimiters (indents, semicolons, etc.); keywords (built into the language); identifiers (names.
Variables, Printing and if-statements
IDLE Hints To re-load a module after making changes:
CISC101 Reminders Quiz 1 grading underway Assn 1 due Today, 9pm.
Lecture 2 Python Programming & Data Types
Basics of ‘C’.
An overview of Java, Data types and variables
Types, Truth, and Expressions (Part 2)
“If you can’t write it down in English, you can’t code it.”
Lecture 2 Python Programming & Data Types
CISC101 Reminders All assignments are now posted.
Topics Designing a Program Input, Processing, and Output
Module 2 - Part 1 Variables, Assignment, and Data Types
Topics Designing a Program Input, Processing, and Output
Unit 3: Variables in Java
Types, Truth, and Expressions
Instructor: Alexander Stoytchev
Types, Truth, and Expressions (Part 2)
Python Reserved Words Poster
Presentation transcript:

CPTR 124 Review for Test 1

Development Tools Editor Similar to a word processor Allows programmer to compose/save/edit source code Compiler/interpreter Translates source code into executable form Debugger Allows programmer to trace through the source code as the program executes Profiler Measures the execution speed of the parts of a running program 2

Identifiers A variable name is an example of an identifier An identifier must Begin with a letter or underscore ( A-Z, a-z, _ ) Remaining characters may be letters, underscores, or digits ( A-Z, a-z, _, 0-9 ) No other characters (including spaces) are permitted A reserved word cannot be used as an identifier Python is case sensitive (capitalization matters)

Reserved Words (you should know what red ones do by now) and del from None try as elif global nonlocal True assert else if not while break except import or with class False in pass yield continue finally is raise def for lambda return

Logic Logical expressions Nested “if” statements else and elif pass

Iteration While For Range Break

Functions How to use them Especially, how to connect them to your program From, import, *, module.function, etc. How to create them Variable locality How to document them using docstrings Default parameter values

How to format printing {} string formatting How the print() function uses its parameters end= and sep= parameters Character codes used in printing (see below)

String Control Codes \n newline \r carriage return \t tab \b backspace \a bell (alert) \' single quote (in a single quoted string) \" double quote (in a double quoted string) \\ backslash print('A\nB\nC') print('D\tE\tF') print('WX\bYZ') print('1\a2\a3\a4\a5\a6')

Arithmetic & Expressions The difference between assignment and equality (= versus ==) Inequality symbols Different types of division: Floating point Different divide operators