1. A(n) structure is a logical design that controls the order in which a set of statements execute. a. function b. control c. sequence d.

Size: px
Start display at page:

Download "1. A(n) structure is a logical design that controls the order in which a set of statements execute. a. function b. control c. sequence d."

Transcription

1 Chapter Four MULTIPLE CHOICE 1. A(n) structure is a logical design that controls the order in which a set of statements execute. a. function b. control c. sequence d. iteration 2. The decision structure that has two possible paths of execution is known as. a. single alternative b. double alternative c. dual alternative d. two alternative 3. Multiple Boolean expressions can be combined by using a logical operator to create expressions. a. sequential b. logical c. compound d. mathematical 4. When using the operator, one or both subexpressions must be true for the compound expression to be true. a. Or b. And c. Not d. Maybe 5. Which logical operators perform short-circuit evaluation? a. or, not b. not, and c. or, and d. and, or, not 6. Which of the following is the correct if clause to determine whether y is in the range 10 through 50? a. if 10 < y or y > 50 b. if 10 > y and y < 50 c. if y > 10 and y < 50 d. if y > 10 or y < A Boolean variable can reference one of two values:. a. yes or no b. true or false c. T or F d. Y or N

2 8. What is the result of the following Boolean expression, if x equals 5, y equals 3, and z equals 8? x < y or z > x a. true b. false c. 8 d What is the result of the following Boolean expression, if x equals 5, y equals 3, and z equals 8? x < y and z > x a. true b. false c. 8 d What is the result of the following Boolean expression, if x equals 5, y equals 3, and z equals 8? not (x < y or z > x) and y < z a. true b. false c. 8 d What does the following expression mean? x <= y a. x is less than y b. x is less than or equal to y c. x is greater than y d. x is greater than or equal to y 12. Which of the following is the correct if clause to use to determine whether choice is other than 10? a. if choice!= 10: b. if choice!= 10 c. if choice <> 10: d. if choice <> When using the operator, both subexpressions must be true for the compound expression to be true. a. or b. and c. not d. maybe 14. In Python, the symbol is used as the not-equal-to operator. a. == b. <>

3 c. <= d.!= 15. In Python the symbol is used as the equality operator. a. == b. = c. >= d. <= TRUE/FALSE 1. True/False: The if statement causes one or more statements to execute only when a Boolean expression is true. 2. True/False: The Python language is not sensitive to block structuring of code. 3. True/False: Python allows you to compare strings, but it is not case sensitive. 4. True/False: Nested decision structures are one way to test more than one condition. 5. True/False: Python uses the same symbols for the assignment operator and the equality operator. 6. True/False: The not operator is a unary operator and it must be a compound expression. 7. True/False: Short-circuit evaluation is performed with the not operator. 8. True/False: Expressions that are tested by the if statement are called Boolean expressions. 9. True/False: Decision structures are also known as selection structures. 10. True/False: An action in a single alternative decision structure is performed only when the condition is true. FILL IN THE BLANK 1. The statement is used to create a decision structure. 2. In flowcharting, the symbol is used to represent a Boolean expression. 3. A(n) decision structure provides only one alternative path of execution. 4. In a decision structure, the action is executed because it is performed only when a certain condition is true. 5. A(n) operator determines whether a specific relationship exists between two values.

4 6. A(n) statement will execute one block of statements if its condition is true, or another block if its condition is false. 7. Python provides a special version of a decision structure known as the statement, which makes the logic of the nested decision structure simpler to write. 8. The logical operator reverses the truth of a Boolean expression. 9. Boolean variables are commonly used as to indicate whether a specific condition exists. 10. A(n) expression is made up of two or more Boolean expressions.

5 Chapter Five MULTIPLE CHOICE 1. What is the disadvantage of coding in one long sequence structure? a. Duplicated code makes the program faster to write. b. Writing a long sequence of statements is error prone. c. If parts of the duplicated code have to be corrected, the correction has to be made many times. d. It does not make use of decision structures. 2. What type of loop structure repeats the code a specific number of times? a. Condition-controlled loop b. Number-controlled loop c. Count-controlled loop d. Boolean-controlled loop 3. What type of loop structure repeats the code based on the value of the Boolean expression? a. Condition-controlled loop b. Number-controlled loop c. Count-controlled loop d. Boolean-controlled loop 4. What is the format for the while clause in Python? a. while condition b. while condition : c. while condition statement d. while condition : statement 5. What are the values that the variable num contains through the iterations of the following for loop? for num in range(2, 9, 2) a. 2, 3, 4, 5, 6, 7, 8, 9 b. 2, 5, 8 c. 2, 4, 6, 8 d. 1, 3, 5, 7, 9 6. What are the values that the variable num contains through the iterations of the following for loop? for num in range(4) a. 1, 2, 3, 4 b. 0, 1, 2, 3, 4 c. 1, 2, 3 d. 0, 1, 2, 3 7. The variable used to keep the running total is called a(n). a. Accumulator b. Total

6 c. running total d. grand total 8. What is not an example of an augmented assignment operator? a. *= b. /= c. -= d. <= 9. is the process of inspecting data that has been input to a program to make sure it is valid before it is used in a computation. a. Input validation b. Correcting data c. Data validation d. Correcting input 10. The first input operation is called the, and its purpose is to get the first input value that will be tested by the validation loop. a. priming read b. first input c. loop set read d. loop validation 11. What is the structure that causes a statement or a set of statements to execute repeatedly? a. Sequence b. Decision c. Module d. Repetition 12. When will the following loop terminate? while keep_on_going!= 999 : a. When keep_on_going refers to a value less than 999 b. When keep_on_going refers to a value greater than 999 c. When keep_on_going refers to a value equal to 999 d. When keep_on_going refers to a value not equal to In Python, a comma-separated sequence of data items that are enclosed in a set of brackets is called a. a. sequence b. variable c. value d. List 14. In Python, the variable in the for clause is referred to as the because it is the target of an assignment at the beginning of each loop iteration. a. target variable b. loop variable c. for variable d. count variable

7 15. Which of the following represents an example to calculate the sum of the numbers (accumulator)? a. total + number = total b. number += number c. total += number d. total = number TRUE/FALSE 1. True/False: Reducing duplication of code is one of the advantages of using a loop structure. 2. True/False: A better way to repeatedly perform an operation is to write the statements for the task once, and then place the statements in a loop that will repeat the statements as many times as necessary. 3. True/False: In flowcharting, the decision structure and the repetition structure both use the diamond symbol to represent the condition that is tested. 4. True/False: The first line in the while loop is referred to as the condition clause. 5. True/False: In Python, an infinite loop usually occurs when the computer accesses the wrong memory address. 6. True/False: Both of the following for clauses would generate the same number of loop iterations: for num in range(4): for num in range(1,5): 7. True/False: The integrity of a program s output is only as good as the integrity of its input. For this reason the program should discard input that is invalid and prompt the user to enter correct data. 8. True/False: Functions can be called from statements in the body of a loop, and loops can be called from the body of a function. 9. True/False: In a nested loop, the inner loop goes through all of its iterations for every single iteration of an outer loop. 10. True/False: To get the total number of iterations of a nested loop, multiply the number of iterations of all the loops. FILL IN THE BLANK 1. A(n) structure causes a statement or set of statements to execute repeatedly.

8 2. A(n) -controlled loop causes a statement or set of statements to repeat as long as a condition is true. 3. The while loop is known as a(n) loop because it tests conditions before performing an iteration. 4. A(n) loop usually occurs when the programmer forgets to write code inside the loop that makes the test condition false. 5. In Python, you would use the statement to write a count-controlled loop. 6. A(n) total is a sum of numbers that accumulates with each iteration of a loop. 7. A(n) is a special value that marks the end of a sequence of items. 8. The acronym refers to the fact that the computer cannot tell the difference between good data and bad data. 9. A(n) validation loop is sometimes called an error trap or an error handler. 10. The function is a built-in function that generates a list of integer values.

9 Chapter Six MULTIPLE CHOICE 1. What is a group of statements that exists within a program for the purpose of performing a specific task? a. function b. subtask c. procedure d. subprogram 2. The first line in the function definition is known as the function. a. header b. block c. return d. parameter 3. The design technique can be used to break down an algorithm into functions. a. subtask b. block c. top-down d. simplification 4. A set of statements that belong together as a group and contribute to the function definition is known as a(n). a. header b. block c. return d. parameter 5. A(n) chart is also known as a structured chart. a. flow b. data c. hierarchy d. organizational 6. A(n) variable is created inside a function. a. global b. constant c. defined d. local 7. The of a local variable is the function in which the variable is created. a. global b. defined c. local d. scope 8. A(n) is any piece of data that is passed into a function when the function is called.

10 a. global b. argument c. scope d. parameter 9. A(n) is a variable that receives an argument that is passed into a function. a. global b. argument c. scope d. parameter 10. The argument specifies which parameter the argument should be passed into. a. keyword b. local c. global d. string 11. A(n) variable is accessible to all the functions in a program file. a. keyword b. local c. global d. string 12. A(n) constant is a global name that references a value that cannot be changed. a. keyword b. local c. global d. string 13. When a function is called by its name, then it is. a. executed b. located c. defined d. exported 14. It is recommended that programmers should avoid using variables in a program when possible. a. local b. global c. string global d. keyword 15. A variable s is the part of a program in which the variable may be accessed. a. global b. argument c. scope d. local 16. The Python library functions that are built into the Python can be used by simply calling the function. a. code

11 b. compiler c. linker d. interpreter 17. Python comes with functions that have been already prewritten for the programmer. a. standard b. library c. custom d. built-in 18. Which of the following statements causes the interpreter to load the contents of the random module into memory? a. load random b. import random c. upload random d. download random 19. Which of the following will assign a random number in the range of 1 through 50 to the variable number? a. random(1,50) = number b. number = random.randint(1, 50) c. randint(1, 50) = number d. number = random(range(1, 50)) 20. What is the result of the following statement? x = random.randint(5, 15) * 2 a. A random integer from 5 to 15, multiplied by 2, assigned to the variable x b. A random integer from 5 to 15 assigned to the variable x c. A random integer from 5 to 15, selected in 2 steps, assigned to the variable x d. A random integer from 5 to 15, raised to the power of 2, assigned to the variable x 21. What type of value is returned by the functions random and uniform? a. integer b. number c. float d. double 22. In a value-returning function, the value of the expression that follows the key word will be sent back to the part of the program that called the function. a. def b. return c. sent d. result 23. What type of function can be used to determine whether a number is even or odd? a. even b. odd c. math d. Boolean

12 24. The Python standard library s module contains numerous functions that can be used in mathematical calculations. a. math b. string c. random d. number 25. Which of the following functions returns the largest integer that is less than or equal to x? a. floor b. ceil c. lesser d. greater 26. What makes it easier to reuse the same code in more than one program? a. Mods b. Procedures c. Modules d. Functions 27. In a menu-driven program, what statement is used to determine and carry out the user s desired action? a. if-else b. if-elif-else c. while d. for 28. A value-returning function is. a. a single statement that perform a specific task b. called when you want the function to stop c. a function that will return a value back to the part of the program that called it d. a function that receives a value when it is called 29. What does the following statement mean? num1, num2 = get_num() a. The function get_num() is expected to return a value each for num1 and num2. b. The function get_num() is expected to return a value and assign it to num1 and num2. c. Statement will cause a syntax error. d. Statement will cause a run-time error. 30. Given the following function definition, what would the statement print magic(5) display? def magic(num): return num + 2 * 10 a. 70 b. 25 c. Statement will cause a syntax error. d. Statement will cause a run-time error. TRUE/FALSE

13 1. True/False: Python function names follow the same rules for naming variables. 2. True/False: The function header marks the beginning of the function definition. 3. True/False: A function definition specifies what a function does and causes the function to execute. 4. True/False: The hierarchy chart shows all the steps that are taken inside a function. 5. True/False: A local variable can be accessed from anywhere in the program. 6. True/False: Different functions can have local variables with the same names. 7. True/False: Python allows for passing multiple arguments to a function. 8. True/False: To assign a value to a global variable in a function, the global variable must first be declared in the function. 9. True/False: The value assigned to a global constant can be changed in the mainline logic. 10. True/False: One of the reasons not to use global variables is that it makes a program hard to debug. 11. True/False: A value-returning function is like a simple function except that when it finishes it returns a value back to the called part of the program. 12. True/False: Boolean functions are useful for simplifying complex conditions that are tested in decision and repetition structures. 13. True/False: Unlike other languages, in Python, the number of values a function can return is limited to one. 14. True/False: In Python, one can have a list of variables on the left side of the assignment operator. 15. True/False: In Python, there is no restriction on the name of a module file. 16. True/False: The randrange function returns a randomly selected value from a specific sequence of numbers. 17. True/False: One of the drawbacks of a modularized program is that the only structure we could use is sequence structure. 18. True/False: In a menu-driven program, a loop structure is used to determine the menu item the user selected. 19. True/False: The math function, atan(x), returns one tangent of x in radians.

14 20. True/False: The math function, ceil(x), returns the smallest integer that is greater than or equal to x. FILL IN THE BLANK 1. The approach called is taking a large task and dividing it into several smaller tasks that are easily performed. 2. The code for a function is known as a function. 3. The function header begins with the keyword followed by the name of the function. 4. The main function contains a program s logic, which is the overall logic of the program. 6. In a flowchart, a function call is depicted by a(n) that has vertical bars. 7. The top-down design breaks down the overall task of the program into a series of. 8. A(n) chart is a visual representation of the relationships between functions. 9. Arguments are passed by to the corresponding parameter variables in the function. 10. A variable is visible only to statements in the variable s. 11. Functions in the standard library are stored in files that are known as. 12. The term is used to describe any mechanism that accepts input, performs some operation that cannot be seen, and produces output. 13. To refer to a function in a module, in our program we have to use the notation. 14. A value-returning function has a(n) statement that returns a value back to the part of the program that called it. 15. The chart is an effective tool that programmers use for designing and documenting functions. 16. The P in the acronym IPO refers to. 17. In Python, a module s file name should end in 18. A(n) program displays a list of the operations on the screen and allows the user to select the operation that the program should perform.

15 19. The approach of makes the program easier to understand, test, and maintain. 20. The return values of the trigonometric functions in Python are in.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha Algorithm & Flowchart & Pseudo code Staff Incharge: S.Sasirekha Computer Programming and Languages Computers work on a set of instructions called computer program, which clearly specify the ways to carry

More information

WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math

WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Textbook Correlation WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Following Directions Unit FIRST QUARTER AND SECOND QUARTER Logic Unit

More information

CSC 221: Computer Programming I. Fall 2011

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

More information

Chapter 13: Program Development and Programming Languages

Chapter 13: Program Development and Programming Languages Understanding Computers Today and Tomorrow 12 th Edition Chapter 13: Program Development and Programming Languages Learning Objectives Understand the differences between structured programming, object-oriented

More information

Chapter 13: Program Development and Programming Languages

Chapter 13: Program Development and Programming Languages 15 th Edition Understanding Computers Today and Tomorrow Comprehensive Chapter 13: Program Development and Programming Languages Deborah Morley Charles S. Parker Copyright 2015 Cengage Learning Learning

More information

PROG0101 Fundamentals of Programming PROG0101 FUNDAMENTALS OF PROGRAMMING. Chapter 3 Algorithms

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.

More information

#820 Computer Programming 1A

#820 Computer Programming 1A Computer Programming I Levels: 10-12 Units of Credit: 1.0 CIP Code: 11.0201 Core Code: 35-02-00-00-030 Prerequisites: Secondary Math I, Keyboarding Proficiency, Computer Literacy requirement Semester 1

More information

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.

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.

More information

Exercise 4 Learning Python language fundamentals

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

More information

Database Programming with PL/SQL: Learning Objectives

Database Programming with PL/SQL: Learning Objectives Database Programming with PL/SQL: Learning Objectives This course covers PL/SQL, a procedural language extension to SQL. Through an innovative project-based approach, students learn procedural logic constructs

More information

Chapter 5. Selection 5-1

Chapter 5. Selection 5-1 Chapter 5 Selection 5-1 Selection (Decision) The second control logic structure is selection: Selection Choosing between two or more alternative actions. Selection statements alter the sequential flow

More information

Visual Logic Instructions and Assignments

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.

More information

I PUC - Computer Science. Practical s Syllabus. Contents

I PUC - Computer Science. Practical s Syllabus. Contents I PUC - Computer Science Practical s Syllabus Contents Topics 1 Overview Of a Computer 1.1 Introduction 1.2 Functional Components of a computer (Working of each unit) 1.3 Evolution Of Computers 1.4 Generations

More information

Programming Your App to Make Decisions: Conditional Blocks

Programming Your App to Make Decisions: Conditional Blocks Chapter 18 Programming Your App to Make Decisions: Conditional Blocks Computers, even small ones like the phone in your pocket, are good at performing thousands of operations in just a few seconds. Even

More information

Python Programming: An Introduction To Computer Science

Python Programming: An Introduction To Computer Science Python Programming: An Introduction To Computer Science Chapter 8 Booleans and Control Structures Python Programming, 2/e 1 Objectives æ To understand the concept of Boolean expressions and the bool data

More information

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction Standard 2: Technology and Society Interaction Technology and Ethics Analyze legal technology issues and formulate solutions and strategies that foster responsible technology usage. 1. Practice responsible

More information

2 SYSTEM DESCRIPTION TECHNIQUES

2 SYSTEM DESCRIPTION TECHNIQUES 2 SYSTEM DESCRIPTION TECHNIQUES 2.1 INTRODUCTION Graphical representation of any process is always better and more meaningful than its representation in words. Moreover, it is very difficult to arrange

More information

El Dorado Union High School District Educational Services

El Dorado Union High School District Educational Services El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming I (#494) Rationale: A continuum of courses, including advanced classes in technology is needed.

More information

Computers. An Introduction to Programming with Python. Programming Languages. Programs and Programming. CCHSG Visit June 2014. Dr.-Ing.

Computers. An Introduction to Programming with Python. Programming Languages. Programs and Programming. CCHSG Visit June 2014. Dr.-Ing. Computers An Introduction to Programming with Python CCHSG Visit June 2014 Dr.-Ing. Norbert Völker Many computing devices are embedded Can you think of computers/ computing devices you may have in your

More information

River Dell Regional School District. Computer Programming with Python Curriculum

River Dell Regional School District. Computer Programming with Python Curriculum River Dell Regional School District Computer Programming with Python Curriculum 2015 Mr. Patrick Fletcher Superintendent River Dell Regional Schools Ms. Lorraine Brooks Principal River Dell High School

More information

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage

More information

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection

More information

VB.NET Programming Fundamentals

VB.NET Programming Fundamentals Chapter 3 Objectives Programming Fundamentals In this chapter, you will: Learn about the programming language Write a module definition Use variables and data types Compute with Write decision-making statements

More information

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science updated 03/08/2012 Unit 1: JKarel 8 weeks http://www.fcps.edu/is/pos/documents/hs/compsci.htm

More information

9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements

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

More information

Some programming experience in a high-level structured programming language is recommended.

Some programming experience in a high-level structured programming language is recommended. Python Programming Course Description This course is an introduction to the Python programming language. Programming techniques covered by this course include modularity, abstraction, top-down design,

More information

Computer Programming I

Computer Programming I Computer Programming I Levels: 10-12 Units of Credit: 1.0 CIP Code: 11.0201 Core Code: 35-02-00-00-030 Prerequisites: Secondary Math I, Keyboarding Proficiency, Computer Literacy requirement (e.g. Exploring

More information

Writing Simple Programs

Writing Simple Programs Chapter 2 Writing Simple Programs Objectives To know the steps in an orderly software development process. To understand programs following the Input, Process, Output (IPO) pattern and be able to modify

More information

McGraw-Hill The McGraw-Hill Companies, Inc., 20 1. 01 0

McGraw-Hill The McGraw-Hill Companies, Inc., 20 1. 01 0 1.1 McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Objectives: To describe the evolution of programming languages from machine language to high-level languages. To understand how a program in a high-level

More information

EMC Publishing. Ontario Curriculum Computer and Information Science Grade 11

EMC Publishing. Ontario Curriculum Computer and Information Science Grade 11 EMC Publishing Ontario Curriculum Computer and Information Science Grade 11 Correlations for: An Introduction to Programming Using Microsoft Visual Basic 2005 Theory and Foundation Overall Expectations

More information

Introduction to Python

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

More information

Object Oriented Software Design

Object Oriented Software Design Object Oriented Software Design Introduction to Java - II Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 28, 2010 G. Lipari (Scuola Superiore Sant Anna) Introduction

More information

VHDL Test Bench Tutorial

VHDL Test Bench Tutorial University of Pennsylvania Department of Electrical and Systems Engineering ESE171 - Digital Design Laboratory VHDL Test Bench Tutorial Purpose The goal of this tutorial is to demonstrate how to automate

More information

What is a Loop? Pretest Loops in C++ Types of Loop Testing. Count-controlled loops. Loops can be...

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

More information

Welcome to Introduction to programming in Python

Welcome to Introduction to programming in Python Welcome to Introduction to programming in Python Suffolk One, Ipswich, 4:30 to 6:00 Tuesday Jan 14, Jan 21, Jan 28, Feb 11 Welcome Fire exits Toilets Refreshments 1 Learning objectives of the course An

More information

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 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

More information

Two-way selection. Branching and Looping

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.

More information

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0

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...

More information

Fundamentals of Programming and Software Development Lesson Objectives

Fundamentals of Programming and Software Development Lesson Objectives Lesson Unit 1: INTRODUCTION TO COMPUTERS Computer History Create a timeline illustrating the most significant contributions to computing technology Describe the history and evolution of the computer Identify

More information

Exercise 1: Python Language Basics

Exercise 1: Python Language Basics Exercise 1: Python Language Basics In this exercise we will cover the basic principles of the Python language. All languages have a standard set of functionality including the ability to comment code,

More information

Object Oriented Software Design

Object Oriented Software Design Object Oriented Software Design Introduction to Java - II Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa September 14, 2011 G. Lipari (Scuola Superiore Sant Anna) Introduction

More information

2. Capitalize initial keyword In the example above, READ and WRITE are in caps. There are just a few keywords we will use:

2. Capitalize initial keyword In the example above, READ and WRITE are in caps. There are just a few keywords we will use: Pseudocode: An Introduction Flowcharts were the first design tool to be widely used, but unfortunately they do t very well reflect some of the concepts of structured programming. Pseudocode, on the other

More information

Problem Solving Basics and Computer Programming

Problem Solving Basics and Computer Programming Problem Solving Basics and Computer Programming A programming language independent companion to Roberge/Bauer/Smith, "Engaged Learning for Programming in C++: A Laboratory Course", Jones and Bartlett Publishers,

More information

Sources: On the Web: Slides will be available on:

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,

More information

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT, 15.1200.40

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT, 15.1200.40 SOFTWARE DEVELOPMENT, 15.1200.40 STANDARD 1.0 APPLY PROBLEM-SOLVING AND CRITICAL THINKING SKILLS TO INFORMATION 1.1 Describe methods of establishing priorities 1.2 Prepare a plan of work and schedule information

More information

High-Level Programming Languages. Nell Dale & John Lewis (adaptation by Michael Goldwasser)

High-Level Programming Languages. Nell Dale & John Lewis (adaptation by Michael Goldwasser) High-Level Programming Languages Nell Dale & John Lewis (adaptation by Michael Goldwasser) Low-Level Languages What are disadvantages of low-level languages? (e.g., machine code or assembly code) Programming

More information

ALGORITHMS AND FLOWCHARTS

ALGORITHMS AND FLOWCHARTS ALGORITHMS AND FLOWCHARTS A typical programming task can be divided into two phases: Problem solving phase produce an ordered sequence of steps that describe solution of problem this sequence of steps

More information

JavaScript: Control Statements I

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

More information

Introduction to Python

Introduction to Python Caltech/LEAD Summer 2012 Computer Science Lecture 2: July 10, 2012 Introduction to Python The Python shell Outline Python as a calculator Arithmetic expressions Operator precedence Variables and assignment

More information

QUIZ-II QUIZ-II. Chapter 5: Control Structures II (Repetition) Objectives. Objectives (cont d.) 20/11/2015. EEE 117 Computer Programming Fall-2015 1

QUIZ-II QUIZ-II. Chapter 5: Control Structures II (Repetition) Objectives. Objectives (cont d.) 20/11/2015. EEE 117 Computer Programming Fall-2015 1 QUIZ-II Write a program that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the numbers, the operator, and the result. (For

More information

Chapter One Introduction to Programming

Chapter One Introduction to Programming Chapter One Introduction to Programming 1-1 Algorithm and Flowchart Algorithm is a step-by-step procedure for calculation. More precisely, algorithm is an effective method expressed as a finite list of

More information

DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan

DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan DATA 301 Introduction to Data Analytics Microsoft Excel VBA Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca DATA 301: Data Analytics (2) Why Microsoft Excel Visual Basic

More information

Pseudo code Tutorial and Exercises Teacher s Version

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

More information

Perl in a nutshell. First CGI Script and Perl. Creating a Link to a Script. print Function. Parsing Data 4/27/2009. First CGI Script and Perl

Perl in a nutshell. First CGI Script and Perl. Creating a Link to a Script. print Function. Parsing Data 4/27/2009. First CGI Script and Perl First CGI Script and Perl Perl in a nutshell Prof. Rasley shebang line tells the operating system where the Perl interpreter is located necessary on UNIX comment line ignored by the Perl interpreter End

More information

Programming and Software Development CTAG Alignments

Programming and Software Development CTAG Alignments Programming and Software Development CTAG Alignments This document contains information about four Career-Technical Articulation Numbers (CTANs) for Programming and Software Development Career-Technical

More information

6.170 Tutorial 3 - Ruby Basics

6.170 Tutorial 3 - Ruby Basics 6.170 Tutorial 3 - Ruby Basics Prerequisites 1. Have Ruby installed on your computer a. If you use Mac/Linux, Ruby should already be preinstalled on your machine. b. If you have a Windows Machine, you

More information

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS) KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

More information

Computer Programming I & II*

Computer Programming I & II* Computer Programming I & II* Career Cluster Information Technology Course Code 10152 Prerequisite(s) Computer Applications, Introduction to Information Technology Careers (recommended), Computer Hardware

More information

Chapter 1 An Introduction to Computers and Problem Solving

Chapter 1 An Introduction to Computers and Problem Solving hapter 1 n Introduction to omputers and Problem Solving Section 1.1 n Introduction to omputers 1. Visual Basic is considered to be a () first-generation language. (B) package. () higher-level language.

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

2011, The McGraw-Hill Companies, Inc. Chapter 5

2011, The McGraw-Hill Companies, Inc. Chapter 5 Chapter 5 5.1 Processor Memory Organization The memory structure for a PLC processor consists of several areas, some of these having specific roles. With rack-based memory structures addresses are derived

More information

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013 Oct 4, 2013, p 1 Name: CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013 1. (max 18) 4. (max 16) 2. (max 12) 5. (max 12) 3. (max 24) 6. (max 18) Total: (max 100)

More information

1 Introduction. 2 Overview of the Tool. Program Visualization Tool for Educational Code Analysis

1 Introduction. 2 Overview of the Tool. Program Visualization Tool for Educational Code Analysis Program Visualization Tool for Educational Code Analysis Natalie Beams University of Oklahoma, Norman, OK nataliebeams@gmail.com Program Visualization Tool for Educational Code Analysis 1 Introduction

More information

APP INVENTOR. Test Review

APP INVENTOR. Test Review APP INVENTOR Test Review Main Concepts App Inventor Lists Creating Random Numbers Variables Searching and Sorting Data Linear Search Binary Search Selection Sort Quick Sort Abstraction Modulus Division

More information

Outline. multiple choice quiz bottom-up design. the modules main program: quiz.py namespaces in Python

Outline. multiple choice quiz bottom-up design. the modules main program: quiz.py namespaces in Python Outline 1 Modular Design multiple choice quiz bottom-up design 2 Python Implementation the modules main program: quiz.py namespaces in Python 3 The Software Cycle quality of product and process waterfall

More information

Programming and Software Development (PSD)

Programming and Software Development (PSD) Programming and Software Development (PSD) Course Descriptions Fundamentals of Information Systems Technology This course is a survey of computer technologies. This course may include computer history,

More information

Curriculum Map. Discipline: Computer Science Course: C++

Curriculum Map. Discipline: Computer Science Course: C++ Curriculum Map Discipline: Computer Science Course: C++ August/September: How can computer programs make problem solving easier and more efficient? In what order does a computer execute the lines of code

More information

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Exam Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) The JDK command to compile a class in the file Test.java is A) java Test.java B) java

More information

Course Title: Software Development

Course Title: Software Development Course Title: Software Development Unit: Customer Service Content Standard(s) and Depth of 1. Analyze customer software needs and system requirements to design an information technology-based project plan.

More information

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London

More information

Designing with Exceptions. CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219

Designing with Exceptions. CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219 Designing with Exceptions CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219 Testing vs. Debugging Testing Coding Does the code work properly YES NO 2 Debugging Testing

More information

Java Programming (10155)

Java Programming (10155) Java Programming (10155) Rationale Statement: The world is full of problems that need to be solved or that need a program to solve them faster. In computer, programming students will learn how to solve

More information

The Elective Part of the NSS ICT Curriculum D. Software Development

The Elective Part of the NSS ICT Curriculum D. Software Development of the NSS ICT Curriculum D. Software Development Mr. CHEUNG Wah-sang / Mr. WONG Wing-hong, Robert Member of CDC HKEAA Committee on ICT (Senior Secondary) 1 D. Software Development The concepts / skills

More information

Chapter 5 Functions. Introducing Functions

Chapter 5 Functions. Introducing Functions Chapter 5 Functions 1 Introducing Functions A function is a collection of statements that are grouped together to perform an operation Define a function Invoke a funciton return value type method name

More information

This loop prints out the numbers from 1 through 10 on separate lines. How does it work? Output: 1 2 3 4 5 6 7 8 9 10

This loop prints out the numbers from 1 through 10 on separate lines. How does it work? Output: 1 2 3 4 5 6 7 8 9 10 Java Loops & Methods The while loop Syntax: while ( condition is true ) { do these statements Just as it says, the statements execute while the condition is true. Once the condition becomes false, execution

More information

Candle Plant process automation based on ABB 800xA Distributed Control Systems

Candle Plant process automation based on ABB 800xA Distributed Control Systems Candle Plant process automation based on ABB 800xA Distributed Control Systems Yousef Iskandarani and Karina Nohammer Department of Engineering University of Agder Jon Lilletuns vei 9, 4879 Grimstad Norway

More information

Chapter 12 Programming Concepts and Languages

Chapter 12 Programming Concepts and Languages Chapter 12 Programming Concepts and Languages Chapter 12 Programming Concepts and Languages Paradigm Publishing, Inc. 12-1 Presentation Overview Programming Concepts Problem-Solving Techniques The Evolution

More information

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage Outline 1 Computer Architecture hardware components programming environments 2 Getting Started with Python installing Python executing Python code 3 Number Systems decimal and binary notations running

More information

Computer Science III Advanced Placement G/T [AP Computer Science A] Syllabus

Computer Science III Advanced Placement G/T [AP Computer Science A] Syllabus Computer Science III Advanced Placement G/T [AP Computer Science A] Syllabus Course Overview This course is a fast-paced advanced level course that focuses on the study of the fundamental principles associated

More information

Flowchart Techniques

Flowchart Techniques C H A P T E R 1 Flowchart Techniques 1.1 Programming Aids Programmers use different kinds of tools or aids which help them in developing programs faster and better. Such aids are studied in the following

More information

Selection Statements

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:

More information

Visual Basic Programming. An Introduction

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

More information

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT, 15.1200.40

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT, 15.1200.40 SOFTWARE DEVELOPMENT, 15.1200.40 1.0 APPLY PROBLEM-SOLVING AND CRITICAL THINKING SKILLS TO INFORMATION TECHNOLOGY 1.1 Describe methods and considerations for prioritizing and scheduling software development

More information

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping 3.1.1 Constants, variables and data types Understand what is mean by terms data and information Be able to describe the difference

More information

Iteration CHAPTER 6. Topic Summary

Iteration CHAPTER 6. Topic Summary CHAPTER 6 Iteration TOPIC OUTLINE 6.1 while Loops 6.2 for Loops 6.3 Nested Loops 6.4 Off-by-1 Errors 6.5 Random Numbers and Simulations 6.6 Loop Invariants (AB only) Topic Summary 6.1 while Loops Many

More information

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. 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

More information

JavaScript: Introduction to Scripting. 2008 Pearson Education, Inc. All rights reserved.

JavaScript: Introduction to Scripting. 2008 Pearson Education, Inc. All rights reserved. 1 6 JavaScript: Introduction to Scripting 2 Comment is free, but facts are sacred. C. P. Scott The creditor hath a better memory than the debtor. James Howell When faced with a decision, I always ask,

More information

Modeling, Computers, and Error Analysis Mathematical Modeling and Engineering Problem-Solving

Modeling, Computers, and Error Analysis Mathematical Modeling and Engineering Problem-Solving Next: Roots of Equations Up: Numerical Analysis for Chemical Previous: Contents Subsections Mathematical Modeling and Engineering Problem-Solving A Simple Mathematical Model Computers and Software The

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Python Programming: An Introduction to Computer Science Chapter 7 Decision Structures Python Programming, 1/e 1 Objectives To understand the programming pattern simple decision and its implementation using

More information

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

Software Development. Topic 1 The Software Development Process

Software Development. Topic 1 The Software Development Process Software Development Topic 1 The Software Development Process 1 The Software Development Process Analysis Design Implementation Testing Documentation Evaluation Maintenance 2 Analysis Stage An Iterative

More information

IF The customer should receive priority service THEN Call within 4 hours PCAI 16.4

IF The customer should receive priority service THEN Call within 4 hours PCAI 16.4 Back to Basics Backward Chaining: Expert System Fundamentals By Dustin Huntington Introduction Backward chaining is an incredibly powerful yet widely misunderstood concept, yet it is key to building many

More information

Wilson Area School District Planned Course Guide

Wilson Area School District Planned Course Guide Wilson Area School District Planned Course Guide Title of planned course: Introduction to Computer Programming Subject Area: Business Grade Level: 9-12 Course Description: In this course, students are

More information

Computational Mathematics with Python

Computational Mathematics with Python Computational Mathematics with Python Basics Claus Führer, Jan Erik Solem, Olivier Verdier Spring 2010 Claus Führer, Jan Erik Solem, Olivier Verdier Computational Mathematics with Python Spring 2010 1

More information

Oracle Database: Develop PL/SQL Program Units

Oracle Database: Develop PL/SQL Program Units Oracle University Contact Us: 1.800.529.0165 Oracle Database: Develop PL/SQL Program Units Duration: 3 Days What you will learn This Oracle Database: Develop PL/SQL Program Units course is designed for

More information

[Refer Slide Time: 05:10]

[Refer Slide Time: 05:10] Principles of Programming Languages Prof: S. Arun Kumar Department of Computer Science and Engineering Indian Institute of Technology Delhi Lecture no 7 Lecture Title: Syntactic Classes Welcome to lecture

More information