...means 0. If a=-4 then +a means -4. Ternary operator:- It precedes an operand. The operand of the unary operator must have arithmetic type and the result is the negation of the operand’s value. Example:- If a=5 then –a means -5 If a=0 then –a means 0 If a=-4 then –a means 4. (b) Assignment and equalto operator Assignment operator:- Equal to operator: An assignment operator assigns value In this we put the To a variable. value as it is. Example – Example- a*=5 means a=5*5. Int a; a=5 means a is initialized with 5 if(a==5) { return true; } return false; (c) Expression and statement Expression:- An expression is any valid combination of operators , constants , and variables. Example:- for(i=0;i=10&&qual==1) sal=15000; else if((g==’m’&&yos>=10&&qual==0)||(g==’m’&&yos=10&&qual=0) sal=9000; else if(g==’f’&&yos25) printf(“driver is insured”); else printf(“driver is not insured”); }}} 4. Ans:- 5. Ans:- #include #include void main() { int...
Words: 399 - Pages: 2
...Problem Solving with Computing Homework - WEEK 2 [30 points] This is a review of some of the material from Chapter 2 and lectures from class. No credit for answers that are copies or near verbatim transcripts – please use your own words1 and document sources where appropriate. 1 This will apply to all assignments in this class. Answer the following questions: Chapter 2 1. Short Answers [1 point each, 2 points total] 1. What does a professional programmer usually do first to gain an understanding of a problem? The first thing that a professional programmer usually do first to gain an understanding of a program is to closely relate customer (Interview ) to inquire or gather information about the problem. 2. What two things must you normally specify in a variable declaration? The two things normally specified in a variable declaration are the variable type and identifier. 2. Algorithms / Pseudocode [1 point each, 5 points total] 1. Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height. Declare height Display “Enter Your Height” Input Height Display “Height” 2. Write assignment statements that perform the following operations with the variables a and b. - Adds 2 to a and stores the result in b. - Subtracts 8 from b and stores the result in a Set b=2+a Set a=b-8 3. Write a pseudocode statement that declares the variable cost so it can hold real numbers. Floating Point-Variable...
Words: 1823 - Pages: 8
...Pre course assignment 2: Performance Related Pay The assignment is to write a paper about Performance Related Pay (2000 words) Performance Related Pay is receiving a great deal of attention. On the one hand (collective) labour agreements are increasingly including arrangements that relate to pay-forperformance, at the same time there is also strong resistance. Trade unions have never been enthusiastic proponents subject to certain conditions, but opinions are also divided in employers' circles. Pay-for-performance is even named as a root cause for the crisis of the financial sector and for the collapse of some companies. A number of companies have recently announced that they will abolish or change their pay- for-performance systems. When organizations have performance related pay systems in place, (front line) managers usually play an important role. They make pay decisions, or provide information for these decisions. The paper is also a preparation for a class debate about pay for performance in the fourth lecture. The debate will be about the statement: “The introduction of individual pay for performance contributes to an improvement in a company's (financial) performance” The paper will be written from one of three starting points: 1. You are against the statement: all arguments you discuss should underpin that the statement is false 2. You are in favour of the statement: all arguments you bring forward should underpin that the statements is true 3. You are undecided: find...
Words: 453 - Pages: 2
...Week 2 Assignment: Understanding Effective Money Management Assessment A, Part 1: Creating a Personal Financial Statement - Assets | 1 point | Car: Bluebook value $1250.00Cash: $378.00Savings Accounts: $826.00 | Assessment A, Part 2: Creating a Personal Financial Statement - Debts | 1 point | Rent: $750.00Electric/ Gas bill: $131.75Cable/ internet/ Phone bill: $80.42Credit Card: $31.00Cell phone bill: $72.37 | Assessment A, Part 3: Identify Money Management Tool | 1 point | Explain to Monica how the money management tools were identified. | Students should explain how they evaluated various cash management products and services. | Assessment A, Part 4: Creating a Personal Financial Statement – Steps | 1 point | Drag the steps listed on the right into their correct sequences on the left. When done click the Send button | Step 1: I got all my financial stuff together – bills, loans, bank statements, etc. | Step 2: I balance my checkbook. | Step 3: I decided what were my assets and what were my debts. | Step 4: I enter my assets in the program. | Step 5: I enter my debts in the program. | Step 6: The program gave me a Net worth figure at the end. | Assessment B: Creating a Monthly Cash Flow Statement ...
Words: 255 - Pages: 2
...Diagnostic Algebra Assessment Definitions Categories Equality Symbol Misconception Graphing Misconception Definition Concept of a Variable Misconception Equality Symbol Misconception As algebra teachers, we all know how frustrating it can be to teach a particular concept and to have a percentage of our students not get it. We try different approaches and activities but to no avail. These students just do not seem to grasp the concept. Often, we blame the students for not trying hard enough. Worse yet, others blame us for not teaching students well enough. Students often learn the equality symbol misconception when they begin learning mathematics. Rather than understanding that the equal sign indicates equivalence between the expressions on the left side and the right side of an equation, students interpret the equal sign as meaning “do something” or the sign before the answer. This problem is exacerbated by many adults solving problems in the following way: 5 × 4 + 3 = ? 5 × 4 = 20 + 3 = 23 Students may also have difficulty understanding statements like 7 = 3 + 4 or 5 = 5, since these do not involve a problem on the left and an answer on the right. Falkner presented the following problem to 6th grade classes: 8 + 4 = [] + 5 All 145 students gave the answer of 12 or 17. It can be assumed that students got 12 since 8 + 4 = 12. The 17 may be from those who continued the problem: 12 + 5 = 17. Students with this misconception may also have difficulty with the idea that adding...
Words: 797 - Pages: 4
...Team B Calorie Count Tool PRG/211 May 5, 2014 Team B Calorie Count Tool PROBLEM STATEMENT Team B was asked to develop a program which would calculate the user’s daily intake of calories and measure those calories against the overall calories expended. The core purpose of this program will do two primary functions. First, it will record the user intake of calories as acquired through meals throughout the day. Second, the user will record caloric output associated with physical activity. This information will be calculated together to determine the caloric surplus or deficit for the user. In order for the program to execute accurately, and provide customized results, the user will be required to input personal data to include gender, age, weight, and height. This additional information is essential to determine the user’s default caloric burn rate, otherwise known as the basal metabolic rate (BMR). The BMR and the calories burned as a result of physical activity will be calculated against the intake of calories to determine the overall success for the user. As the program is executed it must: * Record user name, age, height, weight to enable more accurate calculations * Record the users specific caloric values entered for each meal * Record the user activity and caloric burn values for that activity * Calculate the basal metabolic rate (BMR) for the individual * Subtotal the total caloric values for the day * Combine the physical activity and...
Words: 1524 - Pages: 7
...Selection statements Selection is used to select which statements are to be performed next based on a condition being true or false. Relational expressions In the solution of many problems, different actions must be taken depending on the value of the data. The if statement in C I used to implement such s decision structure in its simplest form – that of selecting a statement to be executed only if a condition is satisfied. Syntax: if(condtion) statement executed if condition is true When an executing program encounters the if statement, the condition is evaluated to determine its numerical value, which is then interpreted as either true or false. If the condition evaluates to any non-0 value (positive or negative), the condition is considered as a “true” condition and the statement following the if is executed; otherwise this statement is not executed. Relational Operators In C Relational operator | Meaning | Example | < | Less than | age < 30 | > | Greater than | height > 6.2 | <= | Less than or equal to | taxable <= 200000 | >= | Greater than or equal to | temp >= 98.6 | == | Equal to | grade == 100 | != | Not equal to | number !=250 | In creating relational expressions, the relational operators must be typed exactly as given in the above table. Thus, although the following relational expressions are all valid: age > 40 length <= 50 temp >= 98.6 3 < 4 flag == done day != 5 The following are invalid: length =< 50 ...
Words: 1617 - Pages: 7
...Ariana Corney Aesa McComb Mina Haw Son Writing assignment #2 When g (0) it is zero because the slope is at zero When it is g (10) it is positive because of the area being colored on the graph. The area under the x-axis is negative, so when you add all of the areas it becomes positive. That brings us to the derivative of g (x), to help us find all of the x-values, which is equal to f(x). Same with the derivative of g (a), it equals f (a), but f (a) is equal to 0. The x values are 2,4,6,8, and 10 when f (0) is equal to f (2), f (4), f (6), f (8), f (10). We determined the increasing/decreasing intervals would be increasing at points where x equals (0,2), (4,6), (8,10) while that g would be decreasing on points where x equals (2,4) and (6,8). As far as finding the extreme values we found that the maximum occurs at when x equals 2, 6, and 10. The minimum occurs at when x equals 0, 4, and 8, while the absolute extreme values are where x equals 2. We determined that g was concaving up when x equals (0,1), (3,5), and (7,9) because the slope of those are increasing throughout the graph. We also determined that g is concaving down when x equals (1,3), (5,7), (9,10) because the slope of those are decreasing down throughout the graph. When the derivative of h is 9, h(x) =g (√x) is equal to f(3)=-2. H(x)= g(√x) so when we need to find the derivative of h(x), we also need to find the derivative of g(√x).The derivative of h(9) then equals the derivative of g(√9) which equals 3. When...
Words: 352 - Pages: 2
...Assignment: Define CSS? -Cascading Style Sheets, a new feature being added to HTML that gives both Web site developers and users more control over how pages are displayed. With CSS, designers and users can create style sheets that define how different elements, such as headers and links, appear. These style sheets can then be applied to any Web page. What are the three types of style in CSS? There are three types of CSS styles: * inline styles Inline styles are styles that are written directly in the tag on the document. Inline styles affect only the tag they are applied to. <a href="" style="text-decoration: none;"> ex. * embedded styles Embedded styles are styles that are embedded in the head of the document. Embedded styles affect only the tags on the page they are embedded in. ex. <style type="text/css"> p { color: #00f; } </style> * external styles External styles are styles that are written in a separate document and then attached to various Web documents. External style sheets can affect any document they are attached to. ex. <link rel="stylesheet" type="text/css" href="styles.css" /> Define JavaScript? -JavaScript is an interpreted programming or script language from Netscape. It is somewhat similar in capability to Microsoft'sVisual Basic, Sun's Tcl, the UNIX-derived Perl, and IBM'sREXX. In general, script languages are easier and faster to code in than the more structured and compiled languages...
Words: 393 - Pages: 2
...Solving Proportions MAT222 Week 1 Assignment September 22, 2014 Solving Proportions Solving for a proportion can be used within numerous real-world problems, such as finding the population of an area. Conservationists are able to predict the population of bear’s in their area by comparing information collected from two experiments. In this problem, 50 bears in Keweenaw Peninsula were tagged and released so conservationists could estimate the bear population. One year later, the conservationist took random samples of 100 bears from the same area, proportions are able to be used in order to determine Keweenaw Peninsula’s bear population. “To estimate the size of the bear population on the Keweenaw Peninsula, conservationists captured, tagged, and released 50 bears. One year later, a random sample of 100 bears included only 2 tagged bears. What is the conservationist’s estimate of the size of the bear population (Dugolpolski, 2012)?” In order to figure the estimated population, some variables need to first be defined and explain the rules for solving proportions. The ratio of originally tagged bears to the entire population is (50/x). The ratio of recaptured tagged bears to the sample size is (2/100). 50x=2100 is how the proportion is set up and is now ready to be solved. Cross multiplication is necessary for this problem. The extremes are (100) and (50). The means are (x) and (2). 100(50)=2x New equation, and now solve for (x). 50002=2x2 Divide both...
Words: 608 - Pages: 3
...C- Operators: An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. C language is rich in built-in operators and provides following type of operators: Arithmetic Operators: Following table shows all the arithmetic operators supported by C language. Assume variable A holds 10 and variable B holds 20 then: Operator Description Example A + B will give 30 A - B will give -10 A * B will give 200 B / A will give 2 B % A will give 0 A++ will give 11 + Adds two operands - Subtracts second operand from the first * Multiply both operands / Divide numerator by de-numerator % Modulus Operator and remainder of after an integer division Increment operator increases integer value by one Decrement operator decreases integer value by one ++ -- A-- will give 9 Relational Operators: Following table shows all the relational operators supported by C language. Assume variable A holds 10 and variable B holds 20 then: Operator Description Checks if the value of two operands is equal or not, if yes then condition becomes true. Checks if the value of two operands is equal or not, if values are not equal then condition becomes true. Example (A == B) is not true. == != (A != B) is true. > Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true. Checks if the value of left operand is less than the value of right operand, if yes then condition...
Words: 462 - Pages: 2
...TR PT1420 5/13/14 Unit Assignment 4 l. What is the general fom1at of the statement used to code decisions in an application? A power full asset of the computer is its ability to make decisions and to take alternate course of action based on the outcome. 2. What is a Boolean expression? a logical statement that is either TRUE or FALSE. 3 . Explain the purpose of comparison operators and logical operators. The purpose of a comparison operator is to test some kind of relationship between two entities examples are >, <, ==, !=, etc 4. How does a comparison performed on numeric data differ from a comparison performed on string data? There are commonly used interchangeably, and the distinction between them is a small one. Comparison to" should be used when comparison is made between specific people, things, or other instances. 5. How does Visual Basic compare the Text property of a text box? When you compare the Text property of a text box with another value the Text property behaves like a variant. Visual Basic compares one text box to another as strings and compares a text box to a numeric variable or constant with a numeric compare. You can force a numeric comparison on a Text property by using the Val function. 6 . Why would it be useful to include the ToUpper method in a comparison? When comparing strings, the case of the characters is important. An uppercase “Y” does not compare equal to a lowercase “y”. Since the user may type a name or word in either...
Words: 902 - Pages: 4
...value stored in an uninitialized variable is __________. a. garbage b. null c. compost d. its identifier 4. The value 3 is a __________. a. numeric variable b. numeric constant c. string variable d. string constant 5. The assignment operator _________. a. is a binary operator b. has left-to-right associativity c. is most often represented by a colon d. two of the above 6. Which of the following is true about arithmetic precedence? a. Multiplication has a higher precedence than division. b. Operators with the lowest precedence always have left-to-right associativity. c. Division has higher precedence than subtraction. d. all of the above 7. Which of the following is a term used as a synonym for “module” in any programming language? a. method b. procedure c. both of these d. none of these 8. Which of the following is a reason to use modularization? a. Modularization avoids abstraction. b. Modularization reduces overhead. c. Modularization allows you to more easily reuse your work. d. Modularization eliminates the need for syntax. 9. What is the name for the process of paying attention to important properties while ignoring nonessential details? a. abstraction b. extraction c. extinction d. modularization 10. Every module has all of the following except __________. a. a...
Words: 1104 - Pages: 5
...Special Assignment This excel sheet can be used to calculate the monthly rating of the recruiter based on a their KPIs(more realistic than those set by the leadership team). Also, this sheet would help the recruitment manager come to a final rating for recruitment related KPIs though this rating is not necessary the final rating in the PMD. Key points • The WIP count would be taken in beginning of the respective month. • Joinees target is calculated based on the number of offers released the previous month. • The KPI of salary percentile is replaced with salary percentage. • Additional scoring: Offer of profile sourced/ER by recruiter will also be considered for the ratings though it is not mandatory. KPIs in Detail There are 4 ratings only Rating 1: Very Good Rating 2: Good Rating 3: Meets Expectation Rating 4: Needs Improvement Offers The offer target for the month would be based on the number of WIP positions with the recruiter in the beginning of the month* *in case the number of WIP positions in the beginning of the month is too low or many positions were cancelled during the month, the recruitment manager would decide the offer target for the recruiter. Rating 1: % of offers is greater than 85% of the WIP positions Rating 2: % of offers is greater than or equal 75% of the WIP positions Rating 3: % of offers is greater than or equal 60% of the WIP positions Rating 4: % of offers is less than...
Words: 764 - Pages: 4
...SAS 认证考试样题 1.A raw data file is listed below. 1---+----10---+----20---+--son Frank 01/31/89 daughter June 12-25-87 brother Samuel 01/17/51 The following program is submitted using this file as input: data work.family; infile 'file-specification'; run; Which INPUT statement correctly reads the values for the variable Birthdate as SAS date values? a. input b. input c. input d. input relation relation relation relation $ $ $ $ first_name first_name first_name first_name $ $ $ $ birthdate birthdate birthdate birthdate date9.; mmddyy8.; : date9.; : mmddyy8.; Correct answer: d An informat is used to translate the calendar date to a SAS date value. The date values are in the form of two-digit values for month-day-year, so the MMDDYY8. informat must be used. When using an informat with list input, the colon-format modifier is required to correctly associate the informat with the variable name. You can learn about • • informats in Reading Date and Time Values the colon-format modifier in Reading Free-Format Data. 2.A raw data file is listed below. 1---+----10---+----20---+--Jose,47,210 Sue,,108 The following SAS program is submitted using the raw data file above as input: data employeestats; input name $ age weight; run; The following output is desired: name age weight Jose 47 210 Sue . 108 Which of the following INFILE statements completes the program and accesses the data correctly? a. infile 'file-specification' pad; b. infile 'file-specification'...
Words: 4408 - Pages: 18