1. Print your name and student number on the Examination Paper.
2. Attempt ALL questions, answering in the spaces provided.
3. Do not detach any portion of the examination paper.
4. Begin writing, as indicated, after the reading time has ended.
Materials allowed (in addition to normal writing materials): Nil
DO NOT REMOVE ANY PART OF THIS EXAM PAPER FROM THE EXAMINATION ROOM
|Student Name: | | |
| | | |
|Student ID: | | |
MODEL ANSWERS
Q1. a) Using the following successive assignment statements in a segment of code, write down the values of variables x & y at the completion of each line of code. Use ‘undefined’ where a variable is undefined.
|code |value of x |value of y |
|y = 3 |undefined |3 |
|x = 2 |2 |3 |
|x = x + y |5 |3 |
|y = y - 1 |5 |2 |
b) Draw a diagram of the activation stack after all the assignment statements have been executed. x 5 y 2 main() --- [2 + 2 = 4 marks]
Q2. Inspect the following code segment.
number = 0 # line 1 max = 0 # line 2 while number > -999: # line 3 number = input (“Enter a number: “) # line 4 - numbers to be entered are in the table
Managerial Decision Modeling w/ Spreadsheets, 3e (Balakrishnan/Render/Stair) Chapter 6 Integer, Goal, and Nonlinear Programming Models 6.1 Chapter Questions 1) These are problems in which some, but not all, the decision variables must have integer solutions: A) mixed IP problems B) pure IP problems C) pure binary problems D) mixed binary IP problems E) goal programming problems Answer: A Page Ref: 212 Topic: Introduction Difficulty: Easy 2) These are problems in which all decision variables…
Introduction COMP 202 – Introduction to Computing 1 COMP 202 – Introduction to Computing 1 COMP-202 Unit 3: Conditional Programming CONTENTS: Boolean Expressions The if and if-else Statements • Suppose we want to write a program which asks the user to enter two numbers and then displays only the larger of the two • This will involve executing certain statements in some circumstances, and different statements in other circumstances • Problem: So far, all the programs we have written…
Lecture 4- Outline 1. (0-1) IP problem: an example 2. LP solution using the DecisionPro software 3. IP solution using DecisionPro 4. (0-1) IP solution using DecisionPro 5. Assignment Problem solution using DecisionPro www.bradford.ac.uk/managem (0-1) IP Problem: An Recreation facilities selection to maximize daily usage Example by residents. Resource constraints: £120,000 budget; 12 acres of land. Selection constraint: either swimming pool or tennis center (not both). Data: Recreation Facility…
EMBA – LP: Using Excel; Transportation & Assignment; Integer Programming Learning goals Modeling in Excel using Solver • Understand the importance of optimization (linear programming) via Excel’s Solver • Understand how to model simple linear programs using Excel and Solver • Understand the power of Solver to perform nonlinear and integer programming The Transportation Model • Understand the structure and assumptions of the transportation model • Understand the…
FOUNDATION REVIEW Contents FR.1 Graphing linear inequalities 2 FR.2 The linear programming model 7 FR.3 Interpreting linear programming results 13 Review questions 16 Introduction Linear programming is commonly used in short-term operations planning. In MA2, you will use linear programming and its related concepts to make relevant management accounting decisions. Knowing how to formulate and interpret a linear program will help you determine the optimum production plan to analyze various…
and helping me deliver on my responsibilities in an efficient manner.” Jennise Sami, Advisor QANTAS The Certificate IV in Programming provides the skills and knowledge for an individual to develop basic programming skills in the most commonly used programming languages PROGRAMMING (ICA40511) The Certificate IV in Programming develops basic programming skills in languages used in commercial systems. The qualification is built around core competencies common to several ICT programs…
1. What got you into programming? I chose it because my mom used to work in a data center. One day she took me to her work and showed me how she operated the IMB system, oversaw all network monitors, servers, modems and routers, assisted end users in their daily system needs and problems, and assisted to IT technicians. what as my incoming major for college because it sounded interesting and I wanted to see if I would like it. 2. How did you learn how to program? Through college courses…
COMP115 Introduction to Computer Science Department of Computing Faculty of Science Unit Guide S1 Day Session 1, North Ryde, Day 2013 Table of Content Table of Content General Information Convenor and teaching staff Credit Points Prerequisites Corequisites Co-badged status Unit Description 2 3 3 3 3 3 3 3 Learning Outcomes Assessment Tasks Weekly Exercises Assignment One Assignment Two Assignment Three Final Examination 4 5 5 5 5 5 6 Unit Schedule Delivery and Resources…
Visual basic, C # = Popular programming languages for being Windows and Web applications. C, C ++ = Powerful advanced programming languages that emphasize flexibility and fast running times. C ++ is also object-oriented. Java = Flexible and powerful programming language that runs on many different computer systems. Often used to teach object-oriented programming. Python = Simple, yet powerful programming language used for graphics and small applications. PHP = Programming language used for creating…
Technology in Zurich. Wirth is best known for creating or designing various programming languages. One of his most famous creations is Pascal. He is also popular for the Wirth’s Law and inventing several topics in software engineering. After Wirth obtained his first degree at the Swiss Federal Institute of Technology, he left for graduate school in North America and earned a Ph.D. in 1963 from the University of California, Berkeley [1]. After graduating, Wirth became an assistant professor at Stanford,…