Reference no: EM131252207
Discussion:
Programming the Familiar Good programmers are able to analyze a task and describe it succinctly, accurately, and unambiguously. Even tasks that you perform without much thought are surprisingly complex when you stop and consider all of their components.
For example, using the self-checkout lane at a grocery store-a simple task completed by thousands of people every day-requires you to:
(1) Select items in your basket;
(2) Scan the UPC codes;
(3) Convey the item to the bagging area;
(4) Bag your groceries; and
(5) Submit payment for your purchases.
A program is an ordered list of instructions that prepares the computer (or in the case of the grocery example, the shopper and new user of the self-checkout lane) to complete a task.
Good instructions are mindful of the target audience, and the less you assume the reader already knows about a process, the more useful the instructions are to a wider audience.
If you have not used the self-checkout lane at a grocery store before, you act as your own cashier. You scan and weigh your items, bag them, and pay for them, while being guided by a digitized voice prompting you to complete each step.
Consider the pseudo code in the "Week 1 Discussion Code" text file (located in this week's Learning Resources) that describes the self-checkout procedure. While it is comprehensive, it is also organized.
It groups instructions related to the same task into a block of text, and adds comments and explanations using specific conventions: Actions defined by a group of steps have descriptive names, including SelectItem, ScanBarCode, and PayingWithCredit.
Blocks of instruction are contained within braces: { and }. // means that the rest of the line is a comment Intended for people, not an instruction to the computer. When /* is used at the beginning of a line, it signifies that the entire line is a comment and will be ignored by the computer.
The symbols /** and */ start and end comments that extend over multiple lines. These are used to describe processes within your program. Note: You will investigate this notation further in Week 2.
The code in the "Week 1 Discussion Code" text file (located in this week's Learning Resources) includes line numbers along the left side of the page. These are not part of the program but they make it easy to refer to specific commands and instructions within the program.
Think about one task you perform so often, it is nearly automatic. Break that task down into its component parts and write a "program" that resembles the grocery self-checkout code provided to describe your task.
Your task should include: At least three major steps, listed in chronological order Specific instructions that describe each step Conditions that direct the flow of the program, such as "if-then," "while," or "until." Comments that explain your program Line numbers
Compute the pure strategy and mixed strategy nash equilibria
: Compute the pure-strategy and mixed-strategy Nash equilibria for this game, and note how they depend on x. In particular, what is the difference between x > 1 and x.
|
Individual whose preferences are described
: Consider an individual whose preferences are described by the utility function is U = X0.5Y0.5. If she consumes 2 units of X and 8 units of Y, then some level of utility will be experienced. If the individual instead consumes 4 units of X, how muc..
|
Write an essay about an intriguing person
: Write an essay about an intriguing person, place, service, activity, establishment, or event. This profile essay will be based on your observation and interview
|
How has social media influenced 2016 presidential elections
: Based upon the articles above, how has social media influenced the 2016 presidential elections? Has this influence been positive or negative? You MUST cite specific examples fromthe articles in response to these questions. Points will be deducted ..
|
Analyze a task and describe it succinctly
: Programming the Familiar Good programmers are able to analyze a task and describe it succinctly, accurately, and unambiguously. Even tasks that you perform without much thought are surprisingly complex when you stop and consider all of their compo..
|
Design an observer and an output feedback for the system
: (Whipple bicycle model) Consider the Whipple bicycle model given by equation (3.7) in Section 3.2. A state feedback for the system was designed in Exercise 6.12. Design an observer and an output feedback for the system.
|
Find the symmetric nash equilibrium
: Find the symmetric Nash equilibrium of this n-player normal-form game. - Compute the probability that at least one person calls for help in equilibrium.
|
Quantity in thousands and is in thousands
: where is the quantity in thousands and is in thousands. Although Arizona is farther away from Ohio than Michigan is from Ohio, assume the transportation costs (for delivery) is the same and, for simplicity, equal to zero.
|
Prove that every game has a nash equilibrium
: Prove that every 2 × 2 game has a Nash equilibrium. - Do this by considering the following general game and breaking the analysis:
|