ESCI 386 IDL Programming for Advanced Earth Science Applications Lesson 6 Program Control
|
|
|
- Jean Perry
- 9 years ago
- Views:
Transcription
1 ESCI 386 IDL Programming for Advanced Earth Science Applications Lesson 6 Program Control Reading: Bowman, Chapters 16 CODE BLOCKS A code block consists of several lines of code contained between a BEGIN and an END statement. Code blocks can be used with IF, ELSE, FOR, CASE, and WHILE statements. The END statement takes the form of whatever statement began the block o ENDIF, ENDELSE, ENDFOR, ENDCASE, or ENDWHILE, depending on the type of block. o Writing just END instead of ENDIF, ENDFOR, etc. is legal, but is highly discouraged. IF THEN ELSE STATEMENTS if then else statements have either a single-line form or a block form. The single-line form looks like the following examples: if condition then expression if condition then expression1 else expression2 The block form looks like the following examples: Example #1 if condition then begin expression endif Example #2 if condition then begin expression1 endif else begin expression2 endelse
2 Example #3 if condition1 then begin expression1 endif else if condition2 then begin expression2 endif else if condition3 then begin exression3 endif else begin expression4 endelse TERNARY OPERATOR IDL has a short-hand way of writing simple, IF-THEN-ELSE statement, using the ternary operator,?:. Then syntax for this is: expression with condition? expression1 : expression2 If condition is true, then expression1 is substituted for condition before the complete expression on the left-hand-side of the? character is executed. If condition is false, then expression2 is substituted for condition before the complete expression on the left-hand-side of the? character is executed. Example 1: z = (a gt b)? a : b will assign the value of a to z if a is greater than b. If not, then b will be assigned to z. o If this were written using IF-THEN-ELSE format it would be if (a gt b) then z = a else z = b Example 2: print, (a gt b)? a : b will print the value of a if a is greater than b. If not, then b will be printed. o If this were written using IF-THEN-ELSE format it would be if (a gt b) then print, a else print, b 2
3 TRUE AND FALSE VALUES A reminder that IDL doesn t have specific logical variable for true and false. Instead, it uses the following rules: Data Type True False Byte, integer, and long Odd integers Zero or even integers Floating point and complex Non-zero values Zero String Any string with non-zero length Null string (" ") This means that you can use variables as the condition in an IF statement as shown by the examples: a = 3 b = 6 if a then print, hi => hi o this evaluates as true and prints because a is an odd integer. a = 3 b = 6 if b then print, hi => o this evaluates as false and doesn t print because b is an even integer. a = b = 0.0 if a then print, hi => hi o this evaluates as true and prints because a is a non-zero floating-point number. a = b = 0.0 if b then print, hi => o this evaluates as false and doesn t print because b is floating-point zero. a = idl b = if a then print, hi => hi o this evaluates as true and prints because a is a non-null string. a =
4 b = 0.0 if b then print, hi => o this evaluates as false and doesn t print because b is a null string. CASE STATEMENT Trying to code a multiple if-then-else statement can get cumbersome. IDL has a CASE statement which is much easier for this type of construct. It looks like: case grade of "A" : QPA = 4.0 "B" : QPA = 3.0 "C" : QPA = 2.0 "D" : QPA = 1.0 else : QPA = 0.0 endcase The CASE statement will test each case until it gets to one that is true, and will then execute that statement, ignoring all cases below it. SWITCH STATEMENT The SWITCH statement is similar to the CASE statement, except that it tests each case until it gets to one that is true, and then executes that statement, AS WELL AS any subsequent statement regardless of whether or not they are true. The example for this, taken from the IDL online documentation, is SWITCH x OF 1: PRINT, 'one' 2: PRINT, 'two' 3: PRINT, 'three' 4: PRINT, 'four' ENDSWITCH which if x = 2 would result in the printing of two, three, and four. 4
5 If the order in the SWITCH were reversed, such as SWITCH x OF 4: PRINT, 'four' 3: PRINT, 'three' 2: PRINT, 'two' 1: PRINT, 'one' ENDSWITCH the result would be the printing of two and one for x = 2. FOR LOOPS IDL has several different constructs for loops. The block-form of a FOR loop in IDL takes the form of for i = m, to n, optional_increment do begin code within loop Examples: for i = 0, 10 do begin d = 2*i print, d would print 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, and 20. for i = 0, 10, 2 do begin would print 0, 2, 4, 6, 8, and 10. o NOTE: If the code within the loop is only a single line, you can actually write it without using the block form (no begin and end statements). You could instead put everything on a single line, such as for i = 0, 10, 2 do 5
6 To increment backward through a loop, use a negative increment interval. Example for i = 10, 0, -2 do begin would print 10, 8, 6, 4, 2, 0. WHILE LOOPS WHILE loops in IDL take the form of while ( some condition ) do begin code within loop endwhile Example: i = 0 while (i le 5) do begin i = i + 1 endwhile would print 0, 1, 2, 3, 4, and 5. REPEAT UNTIL LOOPS REPEAT UNTIL loops in IDL take the form of repeat begin code within loop endrep until ( some condition ) 6
7 Example: i = 0 repeat begin i = i + 1 endrep until (i ge 5) would print 0, 1, 2, 3, and 4. FOR and WHILE loops evaluate the condition or counter at the beginning of the loop. REPEAT UNTIL loops evaluate the condition at the end of the loop. BREAKING OUT OF A LOOP OR IF BLOCK The BREAK procedure will terminate a loop or if-block and carry-on with the rest of the program. The EXIT procedure will terminate the program. 7
JavaScript: Control Statements I
1 7 JavaScript: Control Statements I 7.1 Introduction 2 The techniques you will learn here are applicable to most high-level languages, including JavaScript 1 7.2 Algorithms 3 Any computable problem can
9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements
9 Control Statements 9.1 Introduction The normal flow of execution in a high level language is sequential, i.e., each statement is executed in the order of its appearance in the program. However, depending
What is a Loop? Pretest Loops in C++ Types of Loop Testing. Count-controlled loops. Loops can be...
What is a Loop? CSC Intermediate Programming Looping A loop is a repetition control structure It causes a single statement or a group of statements to be executed repeatedly It uses a condition to control
Sources: On the Web: Slides will be available on:
C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,
Keywords are identifiers having predefined meanings in C programming language. The list of keywords used in standard C are : unsigned void
1. Explain C tokens Tokens are basic building blocks of a C program. A token is the smallest element of a C program that is meaningful to the compiler. The C compiler recognizes the following kinds of
Number Representation
Number Representation CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Topics to be Discussed How are numeric data
Section 1. Inequalities -5-4 -3-2 -1 0 1 2 3 4 5
Worksheet 2.4 Introduction to Inequalities Section 1 Inequalities The sign < stands for less than. It was introduced so that we could write in shorthand things like 3 is less than 5. This becomes 3 < 5.
Unix Scripts and Job Scheduling
Unix Scripts and Job Scheduling Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh [email protected] http://www.sis.pitt.edu/~spring Overview Shell Scripts
Selection Statements
Chapter 5 Selection Statements 1 Statements So far, we ve used return statements and expression ess statements. e ts. Most of C s remaining statements fall into three categories: Selection statements:
Summary of the MARIE Assembly Language
Supplement for Assignment # (sections.8 -. of the textbook) Summary of the MARIE Assembly Language Type of Instructions Arithmetic Data Transfer I/O Branch Subroutine call and return Mnemonic ADD X SUBT
First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science
First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca
Translating to Java. Translation. Input. Many Level Translations. read, get, input, ask, request. Requirements Design Algorithm Java Machine Language
Translation Translating to Java Introduction to Computer Programming The job of a programmer is to translate a problem description into a computer language. You need to be able to convert a problem description
Visual Logic Instructions and Assignments
Visual Logic Instructions and Assignments Visual Logic can be installed from the CD that accompanies our textbook. It is a nifty tool for creating program flowcharts, but that is only half of the story.
Bash shell programming Part II Control statements
Bash shell programming Part II Control statements Deniz Savas and Michael Griffiths 2005-2011 Corporate Information and Computing Services The University of Sheffield Email [email protected]
PL / SQL Basics. Chapter 3
PL / SQL Basics Chapter 3 PL / SQL Basics PL / SQL block Lexical units Variable declarations PL / SQL types Expressions and operators PL / SQL control structures PL / SQL style guide 2 PL / SQL Block Basic
Introduction to Python
WEEK ONE Introduction to Python Python is such a simple language to learn that we can throw away the manual and start with an example. Traditionally, the first program to write in any programming language
Two-way selection. Branching and Looping
Control Structures: are those statements that decide the order in which individual statements or instructions of a program are executed or evaluated. Control Structures are broadly classified into: 1.
ESCI 386 Scientific Programming, Analysis and Visualization with Python. Lesson 5 Program Control
ESCI 386 Scientific Programming, Analysis and Visualization with Python Lesson 5 Program Control 1 Interactive Input Input from the terminal is handled using the raw_input() function >>> a = raw_input('enter
Systems I: Computer Organization and Architecture
Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems - Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x
Conditions & Boolean Expressions
Conditions & Boolean Expressions 1 In C++, in order to ask a question, a program makes an assertion which is evaluated to either true (nonzero) or false (zero) by the computer at run time. Example: In
Unix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, 2008. 1 Introduction 1. 2 Invoking Shell Scripts 2
Unix Shell Scripts Norman Matloff July 30, 2008 Contents 1 Introduction 1 2 Invoking Shell Scripts 2 2.1 Direct Interpretation....................................... 2 2.2 Indirect Interpretation......................................
Lecture 2 Notes: Flow of Control
6.096 Introduction to C++ January, 2011 Massachusetts Institute of Technology John Marrero Lecture 2 Notes: Flow of Control 1 Motivation Normally, a program executes statements from first to last. The
Supplemental Worksheet Problems To Accompany: The Pre-Algebra Tutor: Volume 1 Section 9 Order of Operations
Supplemental Worksheet Problems To Accompany: The Pre-Algebra Tutor: Volume 1 Please watch Section 9 of this DVD before working these problems. The DVD is located at: http://www.mathtutordvd.com/products/item66.cfm
Answers to Review Questions Chapter 7
Answers to Review Questions Chapter 7 1. The size declarator is used in a definition of an array to indicate the number of elements the array will have. A subscript is used to access a specific element
Pseudo code Tutorial and Exercises Teacher s Version
Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy
Compsci 101: Test 1. October 2, 2013
Compsci 101: Test 1 October 2, 2013 Name: NetID/Login: Community Standard Acknowledgment (signature) Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 TOTAL: value 16 pts. 12 pts. 20 pts. 12 pts. 20 pts.
Lecture 4: Writing shell scripts
Handout 5 06/03/03 1 Your rst shell script Lecture 4: Writing shell scripts Shell scripts are nothing other than les that contain shell commands that are run when you type the le at the command line. That
Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:
Numeral Systems Which number is larger? 25 8 We need to distinguish between numbers and the symbols that represent them, called numerals. The number 25 is larger than 8, but the numeral 8 above is larger
Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.
Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole
Creating a Simple Macro
28 Creating a Simple Macro What Is a Macro?, 28-2 Terminology: three types of macros The Structure of a Simple Macro, 28-2 GMACRO and ENDMACRO, Template, Body of the macro Example of a Simple Macro, 28-4
Systems Programming & Scripting
Systems Programming & Scripting Lecture 14 - Shell Scripting: Control Structures, Functions Syst Prog & Scripting - Heriot Watt University 1 Control Structures Shell scripting supports creating more complex
UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming
UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming 1 2 Foreword First of all, this book isn t really for dummies. I wrote it for myself and other kids who are on the team. Everything
Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)
Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating
Chapter 2: Algorithm Discovery and Design. Invitation to Computer Science, C++ Version, Third Edition
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science, C++ Version, Third Edition Objectives In this chapter, you will learn about: Representing algorithms Examples of algorithmic problem
Chapter 2 Introduction to Java programming
Chapter 2 Introduction to Java programming 1 Keywords boolean if interface class true char else package volatile false byte final switch while throws float private case return native void protected break
J a v a Quiz (Unit 3, Test 0 Practice)
Computer Science S-111a: Intensive Introduction to Computer Science Using Java Handout #11 Your Name Teaching Fellow J a v a Quiz (Unit 3, Test 0 Practice) Multiple-choice questions are worth 2 points
BASH Scripting. A bash script may consist of nothing but a series of command lines, e.g. The following helloworld.sh script simply does an echo.
BASH Scripting bash is great for simple scripts that automate things you would otherwise by typing on the command line. Your command line skills will carry over to bash scripting and vice versa. bash comments
How To Program In Scheme (Prolog)
The current topic: Scheme! Introduction! Object-oriented programming: Python Functional programming: Scheme! Introduction Next up: Numeric operators, REPL, quotes, functions, conditionals Types and values
Introduction to Java
Introduction to Java The HelloWorld program Primitive data types Assignment and arithmetic operations User input Conditional statements Looping Arrays CSA0011 Matthew Xuereb 2008 1 Java Overview A high
Facebook Twitter YouTube Google Plus Website Email
PHP MySQL COURSE WITH OOP COURSE COVERS: PHP MySQL OBJECT ORIENTED PROGRAMMING WITH PHP SYLLABUS PHP 1. Writing PHP scripts- Writing PHP scripts, learn about PHP code structure, how to write and execute
6. Control Structures
- 35 - Control Structures: 6. Control Structures A program is usually not limited to a linear sequence of instructions. During its process it may bifurcate, repeat code or take decisions. For that purpose,
Python Lists and Loops
WEEK THREE Python Lists and Loops You ve made it to Week 3, well done! Most programs need to keep track of a list (or collection) of things (e.g. names) at one time or another, and this week we ll show
Grandstream XML Application Guide Three XML Applications
Grandstream XML Application Guide Three XML Applications PART A Application Explanations PART B XML Syntax, Technical Detail, File Examples Grandstream XML Application Guide - PART A Three XML Applications
Stacks. Linear data structures
Stacks Linear data structures Collection of components that can be arranged as a straight line Data structure grows or shrinks as we add or remove objects ADTs provide an abstract layer for various operations
Selection: Boolean Expressions (2) Precedence chart:
Selection: Boolean Expressions Boolan operators: Return a Boolean value Types: 1. Relational operators Operators: (a) < (less than) (b) > (greater than) (c) = (equal to) (d)
EXTENDED FILE SYSTEM FOR F-SERIES PLC
EXTENDED FILE SYSTEM FOR F-SERIES PLC Before you begin, please download a sample I-TRiLOGI program that will be referred to throughout this manual from our website: http://www.tri-plc.com/trilogi/extendedfilesystem.zip
Programming in postgresql with PL/pgSQL. Procedural Language extension to postgresql
Programming in postgresql with PL/pgSQL Procedural Language extension to postgresql 1 Why a Programming Language? Some calculations cannot be made within a query (examples?) Two options: Write a program
5.1 Radical Notation and Rational Exponents
Section 5.1 Radical Notation and Rational Exponents 1 5.1 Radical Notation and Rational Exponents We now review how exponents can be used to describe not only powers (such as 5 2 and 2 3 ), but also roots
We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.
LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.
Programming Logic and Design Eighth Edi(on
Programming Logic and Design Eighth Edi(on Chapter 3 Understanding Structure Objec3ves In this chapter, you will learn about: The disadvantages of unstructured spaghea code The three basic structures sequence,
Chapter 3 Operators and Control Flow
Chapter 3 Operators and Control Flow I n this chapter, you will learn about operators, control flow statements, and the C# preprocessor. Operators provide syntax for performing different calculations or
EE 261 Introduction to Logic Circuits. Module #2 Number Systems
EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook
MATLAB Programming. Problem 1: Sequential
Division of Engineering Fundamentals, Copyright 1999 by J.C. Malzahn Kampe 1 / 21 MATLAB Programming When we use the phrase computer solution, it should be understood that a computer will only follow directions;
Using Loops to Repeat Code
Using s to Repeat Code Why You Need s The macro recording tools in Microsoft Word and Microsoft Excel make easy work of creating simple coding tasks, but running a recorded macro is just that you do a
Visual Basic Programming. An Introduction
Visual Basic Programming An Introduction Why Visual Basic? Programming for the Windows User Interface is extremely complicated. Other Graphical User Interfaces (GUI) are no better. Visual Basic provides
PROG0101 Fundamentals of Programming PROG0101 FUNDAMENTALS OF PROGRAMMING. Chapter 3 Algorithms
PROG0101 FUNDAMENTALS OF PROGRAMMING Chapter 3 1 Introduction to A sequence of instructions. A procedure or formula for solving a problem. It was created mathematician, Mohammed ibn-musa al-khwarizmi.
CSC 221: Computer Programming I. Fall 2011
CSC 221: Computer Programming I Fall 2011 Python control statements operator precedence importing modules random, math conditional execution: if, if-else, if-elif-else counter-driven repetition: for conditional
Writing Control Structures
Writing Control Structures Copyright 2006, Oracle. All rights reserved. Oracle Database 10g: PL/SQL Fundamentals 5-1 Objectives After completing this lesson, you should be able to do the following: Identify
Lab 4.4 Secret Messages: Indexing, Arrays, and Iteration
Lab 4.4 Secret Messages: Indexing, Arrays, and Iteration This JavaScript lab (the last of the series) focuses on indexing, arrays, and iteration, but it also provides another context for practicing with
Shell Scripts (1) For example: #!/bin/sh If they do not, the user's current shell will be used. Any Unix command can go in a shell script
Shell Programming Shell Scripts (1) Basically, a shell script is a text file with Unix commands in it. Shell scripts usually begin with a #! and a shell name For example: #!/bin/sh If they do not, the
Unit 7 The Number System: Multiplying and Dividing Integers
Unit 7 The Number System: Multiplying and Dividing Integers Introduction In this unit, students will multiply and divide integers, and multiply positive and negative fractions by integers. Students will
Outline. Conditional Statements. Logical Data in C. Logical Expressions. Relational Examples. Relational Operators
Conditional Statements For computer to make decisions, must be able to test CONDITIONS IF it is raining THEN I will not go outside IF Count is not zero THEN the Average is Sum divided by Count Conditions
THE UNIVERSITY OF TRINIDAD & TOBAGO
THE UNIVERSITY OF TRINIDAD & TOBAGO FINAL ASSESSMENT/EXAMINATIONS DECEMBER 2013 Course Code and Title: Reasoning and Logic for Computing Programme: Diploma in Software Engineering Date and Time: 12 December
VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0
VISUAL GUIDE to RX Scripting for Roulette Xtreme - System Designer 2.0 UX Software - 2009 TABLE OF CONTENTS INTRODUCTION... ii What is this book about?... iii How to use this book... iii Time to start...
Interactive Data Language Guide. Chris Lowder
Interactive Data Language Guide Chris Lowder Summer 2014 Contents 1 WebGDL 1 1.1 Web access.............................. 1 1.2 Command layout........................... 1 1.3 Persistence of files..........................
Exercise 4 Learning Python language fundamentals
Exercise 4 Learning Python language fundamentals Work with numbers Python can be used as a powerful calculator. Practicing math calculations in Python will help you not only perform these tasks, but also
The string of digits 101101 in the binary number system represents the quantity
Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for
Cosmological Arguments for the Existence of God S. Clarke
Cosmological Arguments for the Existence of God S. Clarke [Modified Fall 2009] 1. Large class of arguments. Sometimes they get very complex, as in Clarke s argument, but the basic idea is simple. Lets
CmpSci 187: Programming with Data Structures Spring 2015
CmpSci 187: Programming with Data Structures Spring 2015 Lecture #12 John Ridgway March 10, 2015 1 Implementations of Queues 1.1 Linked Queues A Linked Queue Implementing a queue with a linked list is
23. RATIONAL EXPONENTS
23. RATIONAL EXPONENTS renaming radicals rational numbers writing radicals with rational exponents When serious work needs to be done with radicals, they are usually changed to a name that uses exponents,
Chapter 8 Selection 8-1
Chapter 8 Selection 8-1 Selection (Decision) The second control logic structure is selection: Selection Choosing between two or more alternative actions. Selection statements alter the sequential flow
Chapter 13 - The Preprocessor
Chapter 13 - The Preprocessor Outline 13.1 Introduction 13.2 The#include Preprocessor Directive 13.3 The#define Preprocessor Directive: Symbolic Constants 13.4 The#define Preprocessor Directive: Macros
Instructor Özgür ZEYDAN (PhD) CIV 112 Computer Programming http://cevre.beun.edu.tr/zeydan/
Algorithms Pseudocode Flowcharts (PhD) CIV 112 Computer Programming http://cevre.beun.edu.tr/zeydan/ Why do we have to learn computer programming? Computers can make calculations at a blazing speed without
Passing 1D arrays to functions.
Passing 1D arrays to functions. In C++ arrays can only be reference parameters. It is not possible to pass an array by value. Therefore, the ampersand (&) is omitted. What is actually passed to the function,
Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products
Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing
Computer Science 281 Binary and Hexadecimal Review
Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two
CAHSEE on Target UC Davis, School and University Partnerships
UC Davis, School and University Partnerships CAHSEE on Target Mathematics Curriculum Published by The University of California, Davis, School/University Partnerships Program 006 Director Sarah R. Martinez,
Recognizing PL/SQL Lexical Units. Copyright 2007, Oracle. All rights reserved.
What Will I Learn? In this lesson, you will learn to: List and define the different types of lexical units available in PL/SQL Describe identifiers and identify valid and invalid identifiers in PL/SQL
Statements and Control Flow
Contents 1. Introduction 2. Types and Variables 3. Statements and Control Flow 4. Reading Input 5. Classes and Objects 6. Arrays 7. Methods 8. Scope and Lifetime 9. Utility classes 10. Introduction to
Software development and programming. Software
CHAPTER 15 15 Software Software development and programming Syllabus outcomes 5.2.1 Describes and applies problem-solving processes when creating solutions. 5.2.2 Designs, produces and evaluates appropriate
ECE 122. Engineering Problem Solving with Java
ECE 122 Engineering Problem Solving with Java Introduction to Electrical and Computer Engineering II Lecture 1 Course Overview Welcome! What is this class about? Java programming somewhat software somewhat
ALGORITHMS AND FLOWCHARTS. By Miss Reham Tufail
ALGORITHMS AND FLOWCHARTS By Miss Reham Tufail ALGORITHMS AND FLOWCHARTS A typical programming task can be divided into two phases: Problem solving phase produce an ordered sequence of steps that describe
The C Programming Language course syllabus associate level
TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming
Programming Exercises
s CMPS 5P (Professor Theresa Migler-VonDollen ): Assignment #8 Problem 6 Problem 1 Programming Exercises Modify the recursive Fibonacci program given in the chapter so that it prints tracing information.
Specimen 2015 am/pm Time allowed: 1hr 30mins
SPECIMEN MATERIAL GCSE COMPUTER SCIENCE 8520/1 Paper 1 Specimen 2015 am/pm Time allowed: 1hr 30mins Materials There are no additional materials required for this paper. Instructions Use black ink or black
Secrets of printf. 1 Background. 2 Simple Printing. Professor Don Colton. Brigham Young University Hawaii. 2.1 Naturally Special Characters
Secrets of Professor Don Colton Brigham Young University Hawaii is the C language function to do formatted printing. The same function is also available in PERL. This paper explains how works, and how
Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic
Today Binary addition Representing negative numbers 2 Binary Addition Consider the following binary numbers: 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1 How do we add these numbers? 3 Binary Addition 0 0 1 0 0 1 1
The Deadly Sins of Algebra
The Deadly Sins of Algebra There are some algebraic misconceptions that are so damaging to your quantitative and formal reasoning ability, you might as well be said not to have any such reasoning ability.
Exercises for Design of Test Cases
Exercises for Design of Test Cases 2005-2010 Hans Schaefer Slide no. 1 Specification The system is an information system for buses, like www.nor-way.no or www.bus.is. The system has a web based interface.
6 3 4 9 = 6 10 + 3 10 + 4 10 + 9 10
Lesson The Binary Number System. Why Binary? The number system that you are familiar with, that you use every day, is the decimal number system, also commonly referred to as the base- system. When you
20 Using Scripts. (Programming without Parts) 20-1
20 Using Scripts (Programming without Parts) This chapter explains the basics of creating and using programming scripts in GP-Pro EX. Please start by reading 20.1 Settings Menu (page 20-2) and then turn
4.8 Thedo while Repetition Statement Thedo while repetition statement
1 4.8 hedo while Repetition Statement hedo while repetition statement Similar to thewhile structure Condition for repetition tested after the body of the loop is performed All actions are performed at
arrays C Programming Language - Arrays
arrays So far, we have been using only scalar variables scalar meaning a variable with a single value But many things require a set of related values coordinates or vectors require 3 (or 2, or 4, or more)
Pemrograman Dasar. Basic Elements Of Java
Pemrograman Dasar Basic Elements Of Java Compiling and Running a Java Application 2 Portable Java Application 3 Java Platform Platform: hardware or software environment in which a program runs. Oracle
Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8
ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also
COSC 1020 3.0 Introduction to Computer Science I Section A, Summer 2005. Question Out of Mark A Total 16. B-1 7 B-2 4 B-3 4 B-4 4 B Total 19
Term Test #2 COSC 1020 3.0 Introduction to Computer Science I Section A, Summer 2005 Family Name: Given Name(s): Student Number: Question Out of Mark A Total 16 B-1 7 B-2 4 B-3 4 B-4 4 B Total 19 C-1 4
An Introduction to Number Theory Prime Numbers and Their Applications.
East Tennessee State University Digital Commons @ East Tennessee State University Electronic Theses and Dissertations 8-2006 An Introduction to Number Theory Prime Numbers and Their Applications. Crystal
The Answer to the 14 Most Frequently Asked Modbus Questions
Modbus Frequently Asked Questions WP-34-REV0-0609-1/7 The Answer to the 14 Most Frequently Asked Modbus Questions Exactly what is Modbus? Modbus is an open serial communications protocol widely used in
