CS122 – Quiz 2 Winter, 2013 Quiz Hints. Quiz 2 Hints Question 1 – working with the “if” statement  First, we did not fully explain the structure of the.

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

How to Import an Excel File Using the SAS Import Wizard SAS 9 for Windows.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2010.
Room Assignments Room Assignments is a companion Excel spreadsheet to the Master Schedule Board tool and is dynamically linked to it. For this tool to.
CIS101 Introduction to Computing Week 12. Agenda Your questions Solutions to practice text Final HTML/JavaScript Project Copy and paste assignment JavaScript:
Congratulations! You are ready to launch your Decision Support System to the company’s web site. After you have finished the Excel, PowerPoint, Word, and.
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 8 - Interest Calculator Application: Introducing.
Geography 465 Assignments, Conditionals, and Loops.
CIS101 Introduction to Computing Week 12 Spring 2004.
Please open your laptops, log in to the MyMathLab course web site, and open Daily Quiz 18. You will have 10 minutes for today’s quiz. The second problem.
Programming – Touch Sensors Intro to Robotics. The Limit Switch When designing robotic arms there is always the chance the arm will move too far up or.
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
Fundamentals of Python: From First Programs Through Data Structures
CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Spring 2010.
CS 123 Computational Lab IIl Spring 2008 Department of Computer Science Drexel University Copyright by the authors. Permission is given for students and.
Java: Chapter 1 Computer Systems Computer Programming II.
CS 122 Engineering Computation Lab Lab 2 Dan De Sousa and Tim Cheeseman Department of Computer Science Drexel University April 2009 ©By the author. All.
Using SAM 2013 in CGS1060 University of Central Florida.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 5 – Dental Payment Application: Introducing.
Variables, operators, canvas, and multimedia Dr. José M. Reyes Álamo.
CS122 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2011.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Spring 2011.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 4 Decision.
CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2010.
Review for Exam2 Key Ideas 1. Key Ideas: Boolean Operators (2 > 3) || (3 < 29.3) A.True B.False C.Impossible to determine (22 > 3) && (3 > 29.3) A.True.
CS122 Instructor Assignments Winter, 2010 Term. Overview Some changes in assignments due to schedule considerations Some new initiatives / revised strategies.
Making Decisions (True or False) Relational Operators >greater than =greater than or equal to
1 FUNCTIONS - I Chapter 5 Functions help us write more complex programs.
CS122 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Winter 2012.
CS122 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Spring 2011.
Software Engineering Principles Dr. José M. Reyes Álamo.
Click on your group to see your activity for today
CS122 / CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Summer 2011 ©By the author. All rights reserved.
Python 101 Dr. Bernard Chen University of Central Arkansas PyArkansas.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2010 ©By the author. All rights reserved. Permission.
CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2012.
CS123 – Quiz 4 Spring, 2013 Quiz Hints. Quiz 4 Hints Question 1 – Working with list elements  Create as a table 1st and convert to a list at the end.
CS 122 Engineering Computation Lab Lab 4 Dan De Sousa and Bruce Char Department of Computer Science Drexel University Summer 2009 ©By the author. All rights.
While and If-Else Loops ROBOTC Software. While Loops While loop is a structure within ROBOTC Allows a section of code to be repeated as long as a certain.
Week 10: Loop Invariants, Code correctness Jimmy Voss Disclaimer: Some material may have been borrowed from both the Official Course slides as well as.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2013.
CS122 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Winter 2012.
Midterm Review Tami Meredith. Primitive Data Types byte, short, int, long Values without a decimal point,..., -1, 0, 1, 2,... float, double Values with.
CS122 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Winter 2010.
CS122 – Quiz 1 Winter, 2013 Quiz Hints. Quiz 1 Hints Question 1 – Understanding procs  First, we did not fully explain the structure of the Maple proc,
Control Flow (Python) Dr. José M. Reyes Álamo. 2 Control Flow Sequential statements Decision statements Repetition statements (loops)
Variables, operators, canvas, and multimedia Dr. Reyes.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2012.
CS 122/CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Summer 2011 ©By the author. All rights reserved.
Alice and Java Unit 7 1. Day 1  Objective: Gain an introduction to Java and Eclipse  Essential skill: DM-1: Use technology to advance critical thinking.
CS122 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Winter 2013.
Conditional Statements A conditional statement lets us choose which statement will be executed next Conditional statements give us the power to make basic.
Midterm preview.
Selection and Python Syntax
CS122 Engineering Computation Lab Lab 4
CS123 Engineering Computation Lab Lab 4
Introduction to Programming
If, else, elif.
CS122 Engineering Computation Lab Lab 3
Making Your “Who/What/Where Am I?” PowerPoint
Introduction to Programming
Visual Basic – Decision Statements
if-else Structures Principles of Engineering
Whitebox Testing.
Stata Basic Course Lab 2.
Introduction to Programming
Review of Previous Lesson
Controlling Program Flow
Agenda for Unit 5: Control Structures
Presentation transcript:

CS122 – Quiz 2 Winter, 2013 Quiz Hints

Quiz 2 Hints Question 1 – working with the “if” statement  First, we did not fully explain the structure of the Maple “if” statement, especially the associated “if-elif-else” versions if (condition1) then – Execute if condition 1 is true; – elif (condition2) then » Execute if condition 2 is true; » Only reach here if condition 1 is false – else » Execute if both conditions 1 and 2 are false end if;

Quiz 2 Hints Question 1 – working with the “if” statement  Also, the boolean operator “and” results in “true” only if both conditions are true If (condition1 and condition2) then – Execute this code only if both conditions are true end if;  To answer the 1st 2 parts, just copy and paste the code into a code edit region and execute. The result for “b” will appear below in the execution trace.  To answer the last 2 questions, inspect the code and determine a possible value for “a” (there are numerous potential answers

Quiz 2 Hints Question 2 – Gapfinder  This “fill in the blanks” problem is very similar to the Lab 1, problem 4 exercise (the n gap problem). In uses the n-1 gap logic to 1st get you to the last overhang before the gap of interest.  “od” at the end of loops is the same as “end do”  Be careful about in which direction the car is touching the barriers. Question 3 – drive in a square (using nested “for” loops)  Review the Lab 2 problem 1 – figure 8 example and then fill in the blanks.

Quiz 2 Hints Questions 4 and 5 – Using the Car Simulator – 1st, some general comments pertaining to both questions It is important to remember from labs 1 and 2 that both the.mw work sheets and the 2 Car Simulator library files must reside in the same folder. That is why we unzipped the file on the course web site and created the folder that contained all necessary files In Maple, we always opened our work sheets for all problems from that folder

Quiz 2 Hints Questions 4 and 5 – Using the Car Simulator – 2nd, the 11 step process described in questions 4 and 5 results in your new file (for the question 4 or 5 solution) residing in the folder along with the 2 library files. – It is critical that you understand and can replicate this process because 2 of the 4 questions on the C portion of your proficiency exam will come from this type of example from either quiz 1 or 2. – Please visit the CLC (room 147 UC) with any questions regarding this procedure

Quiz 2 Hints Questions 4 and 5 – other tips and hints – For either question, it is possible that the car is NOT originally facing the proper direction. If this is the case, you must start your solution with an appropriate turn. – Note that each question contains 2 sets of code for creating the grid. Each will set up a grid with different spacing between barriers, turns and targets, so you cannot count and code the number of blocks to move for a specific layout. “while” loops are necessary to determine when you are at the target, gap, etc. If both sets of code work, your solution has been correctly coded.

Quiz 2 Hints Questions 4 and 5 – other tips and hints – Finally, the easiest way to copy and paste the properly formatted proc code into the quiz solution box is to highlight and copy the blue code under the code edit region (in the execution trace) that is produced when the proc is executed. This will ensure that the appropriate syntax is captured. – The solutions themselves consist merely of the correct ordering of moves, turns and isTouching functions.