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.

Save this PDF as:
 WORD  PNG  TXT  JPG

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.

Repetition and Loops. Additional Python constructs that allow us to effect the (1) order and (2) number of times that program statements are executed.

Repetition and Loops. Additional Python constructs that allow us to effect the (1) order and (2) number of times that program statements are executed. New Topic Repetition and Loops Additional Python constructs that allow us to effect the (1) order and (2) number of times that program statements are executed. These constructs are the 1. while loop and

More information

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

Introduction to Programming

Introduction to Programming Introduction to Programming If you re new to programming, you might be intimidated by code and flowcharts. You might even wonder how you ll ever understand them. This lesson offers some basic ideas and

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

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY ACADEMIC YEAR: 0 7 VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 0 0 SEMESTER: ODD BRANCH: MCA YEAR: I SEMESTER: I SUBJECT CODE AND NAME: MC70 Problem Solving and Programming NAME OF THE FACULTY

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

Review questions for Chapter 9

Review questions for Chapter 9 Answer first, then check at the end. Review questions for Chapter 9 True/False 1. A compiler translates a high-level language program into the corresponding program in machine code. 2. An interpreter is

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

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

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

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

#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

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

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

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

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

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

Scripting with TCL, Part 1

Scripting with TCL, Part 1 Scripting with TCL, Part 1 Axel Kohlmeyer Center for Molecular Modeling University of Pennsylvania SBS 2007 @ JNCASR, Bangalore The VMD Execution Model GUI (FLTK) Internal State Visualization Python Interpreter

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

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

C Programming Dr. Hasan Demirel

C Programming Dr. Hasan Demirel C How to Program, H. M. Deitel and P. J. Deitel, Prentice Hall, 5 th edition (3 rd edition or above is also OK). Introduction to C Programming Dr. Hasan Demirel Programming Languages There are three types

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

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

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

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

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

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

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

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

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

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

PROGRAM-SOLVING AND PROGRAM DESIGN

PROGRAM-SOLVING AND PROGRAM DESIGN PROGRAM-SOLVING AND PROGRAM DESIGN Objective One Outline the steps in problem-solving A problem may be defined as a situation or task that needs to be solved. Problem-Solving is a process which involves

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

GTU Questions. Computer Programming & Utilization. Chief Course Coordinator Prof. Mitul K.Patel. (Head of Department & Assistant Professor)

GTU Questions. Computer Programming & Utilization. Chief Course Coordinator Prof. Mitul K.Patel. (Head of Department & Assistant Professor) GTU Questions Computer Programming & Utilization Chief Course Coordinator Prof. Mitul K.Patel (Head of Department & Assistant Professor) Course Coordinator Prof. Vrutti D. Shah (Assistant Professor) Lab

More information

Programming Fundamental. Instructor Name: Lecture-2

Programming Fundamental. Instructor Name: Lecture-2 Programming Fundamental Instructor Name: Lecture-2 Today s Lecture What is Programming? First C++ Program Programming Errors Variables in C++ Primitive Data Types in C++ Operators in C++ Operators Precedence

More information

Java How to Program, 9/e

Java How to Program, 9/e Java How to Program, 9/e Education, Inc. All Rights Reserved. 1 Any computing problem can be solved by executing a series of actions in a specific order. An algorithm is a procedure for solving a problem

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

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

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

ALGORITHM AND FLOW CHART

ALGORITHM AND FLOW CHART ALGORITHM AND FLOW CHART 1.1 Introduction 1.2 Problem Solving 1.3 Algorithm 1.3.1 Examples of Algorithm 1.3.2 Properties of an Algorithm 1.4 Flow Chart 1.4.1 Flow Chart Symbols 1.4.2 Some Flowchart Examples

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

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

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

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

Welcome to Starting Out with Programming Logic and Design, Second Edition.

Welcome to Starting Out with Programming Logic and Design, Second Edition. Preface Welcome to Starting Out with Programming Logic and Design, Second Edition. This book uses a language-independent approach to teach programming concepts and problem-solving skills, without assuming

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

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

Chapter 5 Looping. At a Glance. Overview. Objectives. Quick Quizzes. Additional Resources. Key Terms

Chapter 5 Looping. At a Glance. Overview. Objectives. Quick Quizzes. Additional Resources. Key Terms Chapter 5 Looping At a Glance Overview Objectives Quick Quizzes Additional Resources Key Terms Lecture Notes Overview Chapter 5 covers loops in detail. Students learn the advantages of looping. They also

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

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

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (2014-15) ASSIGNMENT / QUESTION BANK (2110003) [F.Y.B.E.

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (2014-15) ASSIGNMENT / QUESTION BANK (2110003) [F.Y.B.E. SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (2014-15) ASSIGNMENT / QUESTION BANK Subject: Computer Programming and Utilization (2110003) [F.Y.B.E.: ALL BRANCHES] Unit 1

More information

SOFTWARE DEVELOPMENT LANGUAGES AND ENVIRONMENTS

SOFTWARE DEVELOPMENT LANGUAGES AND ENVIRONMENTS HIGHER COMPUTING SOFTWARE DEVELOPMENT SOFTWARE DEVELOPMENT LANGUAGES AND ENVIRONMENTS PROCEDURAL, DECLARATIVE AND EVENT-DRIVEN LANGUAGES 1. A program contains the following statement: is_a(rover,dog).

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

Adjusted/Modified by Nicole Tobias. Chapter 2: Basic Elements of C++

Adjusted/Modified by Nicole Tobias. Chapter 2: Basic Elements of C++ Adjusted/Modified by Nicole Tobias Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types

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

Access Tutorial 12: An Introduction to Visual Basic

Access Tutorial 12: An Introduction to Visual Basic Access Tutorial 12: An Introduction to Visual Basic 12.1 Introduction: Learning the basics of programming Programming can be an enormously complex and difficult activity. Or it can be quite straightforward.

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

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

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

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

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

Engineering Problem Solving with C++, Etter/Ingber

Engineering Problem Solving with C++, Etter/Ingber Engineering Problem Solving with C++, Etter/Ingber Chapter 3 Control Structures 1 Control structures Algorithm Development Conditional Expressions Selection Statements Repetition Statements Structuring

More information

Introduction to Programming in C++: Algorithms, Flowcharts and Pseudocode

Introduction to Programming in C++: Algorithms, Flowcharts and Pseudocode Introduction to Programming in C++: Algorithms, Flowcharts and Pseudocode by Brent Daviduck The following material was developed by Brent Daviduck of the Computer Systems Technology program at Red Deer

More information

Thomas Jefferson High School for Science and Technology Program of Studies Accelerated Foundations of Computer Science as of April 2013

Thomas Jefferson High School for Science and Technology Program of Studies Accelerated Foundations of Computer Science as of April 2013 Thomas Jefferson High School for Science and Technology Program of Studies Accelerated Foundations of Computer Science as of April 2013 Unit of Study / Accelerated Foundations of Computer Science is offered

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

TI-83 Plus Graphing Calculator Keystroke Guide

TI-83 Plus Graphing Calculator Keystroke Guide TI-83 Plus Graphing Calculator Keystroke Guide In your textbook you will notice that on some pages a key-shaped icon appears next to a brief description of a feature on your graphing calculator. In this

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

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

LINUX SHELL SCRIPTING

LINUX SHELL SCRIPTING LINUX SHELL SCRIPTING @Copyright 2015 1 1. Chapter 1: Quick Introduction to Linux What Is Linux? Who created Linux? Where can I download Linux? How do I Install Linux? Linux usage in everyday life What

More information

Common Syntax and Semantic Errors

Common Syntax and Semantic Errors C H A P T E R 2 Common Syntax and Semantic Errors 2.1 CHAPTER OBJECTIVES To understand the fundamental characteristics of syntax and semantic errors To be able to identify specific common syntax and semantic

More information

JAVA PRIMITIVE DATA TYPE

JAVA PRIMITIVE DATA TYPE JAVA PRIMITIVE DATA TYPE Description Not everything in Java is an object. There is a special group of data types (also known as primitive types) that will be used quite often in programming. For performance

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

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

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

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

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

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

Course: Introduction to Java Using Eclipse Training

Course: Introduction to Java Using Eclipse Training Course: Introduction to Java Using Eclipse Training Course Length: Duration: 5 days Course Code: WA1278 DESCRIPTION: This course introduces the Java programming language and how to develop Java applications

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

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

INTRODUCTION TO FLOWCHARTING

INTRODUCTION TO FLOWCHARTING CHAPTER 1 INTRODUCTION TO FLOWCHARTING 1.0 Objectives 1.1 Introduction 1.2 Flowcharts 1.3 Types of Flowcharts 1.3.1 Types of flowchart 1.3.2 System flowcharts 1.4 Flowchart Symbols 1.5 Advantages of Flowcharts

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

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

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

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

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

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

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

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

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

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

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

Course 10550A: Programming in Visual Basic with Microsoft Visual Studio 2010 OVERVIEW

Course 10550A: Programming in Visual Basic with Microsoft Visual Studio 2010 OVERVIEW Course 10550A: Programming in Visual Basic with Microsoft Visual Studio 2010 OVERVIEW About this Course This course teaches you Visual Basic language syntax, program structure, and implementation by using

More information