330 Words2 Pages

Short Answer 5 & 6
5. What two things must you normally specify in a variable declaration?
You must specify type & name.
6. What value is stored in uninitialized variables?
An uninitialized variable is by default a 0.
Algorithm Workbench 3-10
3. Write assignment statements that perform the following operations with the variable a, b and c.
a) Adds 2 to a and stores the result in b. { b = 2 + a }
b) Multiplies b by 4 and stores the result in a. { a = b * 4}
c) Divides a by 3.14 and stores the result in b. { b = a MOD 3.14 }
d) Subtracts 8 from b and stores the result in a { a = 8 – b }
4. Assume the variables result, w, x, y and z are all integers, and that w=5, x=4, y=8 and z=2. What value will be stored in result in each of the following statements?
a) 12 = x + y
b) 4 = z * 2
c) 2 = y / x
d) 6 = y – z
5. Write a pseudocode statement that declares the variable cost so it can hold a real numbers.
Dim cost1 As Double = 0
6. Write pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0.
Dim cost1 As Integer = 0
7. Write a pseudocode statement that assigns the value 27 to the variable count.
Dim count As Integer = 27
8. Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total.
Total = 10 + 14
9. Write a pseudocode statement that subtracts the variable downpayment from the variable total and assigns the result to the variable due.
due = downpayment – total
10. Write a pseudocode statement that multiplies the variable subtotal by 0.15 and assigns the result to the variable totalfee.
First you must make the variables real numbers. example.Dim subtotal As Double = 0
The statement asked for in the question will appear as totalfee = subtotal *

Related

## It104 Wk 4 Hw

432 Words | 2 PagesWhy do global variables make a program difficult to debug? Algorithm Workbench 1. Design a module named timesTen. The module should accept an Integer argument. When the module is called, it should display the product of its argument multiplied times 10.

## Unit 3 Assignment 1

455 Words | 2 PagesNovember 1, 2013 Unit 3 homework 3 Short answer 5. Write a pseudo code statement that declares the variable cost so it can hold real numbers? long cost int total count=220 total=10+210 totalfee=total-downPayment 6. Write a pseudo code statement that declares the variable total so it can hold integers. Initialize the variable with the value 0.

## Mat 540 Week 1 Assignment

1004 Words | 5 PagesAssignment #2 1) Improve the result from problem 4 of the previous assignment by showing that for every e> 0, no matter how small, given n real numbers x1,...,xn where each xi is a real number in the interval [0, 1], there exists an algorithm that runs in linear time and that will output a permutation of the numbers, say y1, ...., yn, such that ∑ ni=2 |yi - yi-1| < 1 + e. (Hint: use buckets of size smaller than 1/n; you might also need the solution to problem 3 from the first assignment!) 2) To evaluate FFT(a0,a1,a2,a3,a4,a5,a6,a7) we apply recursively FFT and obtain FFT( a0,a2,a4,a6) and FFT(a1,a3,a5,a7). Proceeding further with recursion, we obtain FFT(a0,a4) and FFT(a2,a6) as well as FFT(a1,a5) and FFT(a3,a7). Thus, from bottom up, FFT(a0,a1,a2,a3,a4,a5,a6,a7)

## Lab 1.1 Essay

280 Words | 2 PagesThey are equivalent because they represent the powers of 10 3: Based on the breakdown of the decimal and binary systems in this lab, describe the available digit values and the first four digits of a base 5 numbering system. You can use the binary system as a reference, where the available digit values are 0 and 1 and the first four digits are 1, 2, 4, and 8. The digit values in a base numbering system are 1s and 0s. You are using 16, 8, 4, 2, 1 instead of 128, 64, 32, 16, 8, 4, 2, and 1. 4: Using the Internet and the Help files in Excel, explain why creating a converter from decimal to binary would be more difficult to construct.

## Chemistry 3.03 Essay

350 Words | 2 PagesTin's actual atomic radius is 140 pm. Use the math equation below to determine the percent error of your estimated value. Percent error = fraction: | actual value minus experimental (estimated value | over actual value × 100 This equation means that you subtract to find the difference between the actual value (given in this problem) and the experimental value (estimated from the graph). The numerator is in an absolute value sign, so the difference should always be positive. Take that difference and divide by the actual value (given in this problem) of tinâ€™s atomic radius.

## Pt1420 Unit 3 Question Paper

458 Words | 2 PagesThe sum of two numbers is 55. What is the larger number? 2. Convert 251 in base 10 to octal(base 8)? 3.What is the language used for Artificial Intelligence Ans : lisp 4.

## Algebra Unit 4 Unit 10

9534 Words | 39 PagesComplete the square in a quadratic expression to reveal the maximum or minimum value of the function it defines. (supporting) | * Ability to recognize key features of a quadratic model given in vertex form | The focus in this unit is on the symbolic manipulation. | c. Use the properties of exponents to transform expressions for exponential functions. For example the expression 1.15t can be rewritten as (1.151/12)12t ≈ 1.01212t to reveal the approximate equivalent monthly interest rate if the annual rate is 15%. (supporting) | * Ability to connect experience with properties of exponents from Unit 2 of this course to more complex expressions | In Algebra I, exponents are limited to integers.

## Sample Critical Thinking Questions

1039 Words | 5 PagesSubstitute. Solve. Check Conversions Units must agree. 2 types of conversions 1. metric to metric prefix line: EX: 2. english to metric Conversion Factor Conversion EX: Scientific Notation Place (.) after the first non zero digit -exponents make the number smaller (left) EX: +exponents make the number larger (right) EX: Addition, Subtraction, Multiplication, and Division of Scientific Notation 1.

## P1 Unit 1 Research Paper

2065 Words | 9 PagesCalculate the sum of the terms of the remaining sequence. Copyright reserved (2) (6) [17] Please turn over Mathematics/P1 4 NSC DBE/November 2010 QUESTION 3 The sequence 4 ; 9 ; x ; 37; … is a quadratic sequence. 3.1 Calculate x. (3) 3.2 Hence, or otherwise, determine the n th term of the sequence. (4) [7] QUESTION 4 a + q.

## Cis305b Essay

821 Words | 4 PagesUsing the product operator, if table A has 4 rows and table B has 4 rows, the number of rows in the product of these two tables is ____. a.|4|c.|16| b.|8|d.|256| A 24. The ____ command will create an application program's or individual user's picture of the database. a.|CREATE SNAPSHOT|c.|SELECT VIEW| b.|SELECT SNAPSHOT|d.|CREATE VIEW| D 25. Essentially, setting the value in a given field to ____ is similar to not entering a value in it at all.

### It104 Wk 4 Hw

432 Words | 2 Pages### Unit 3 Assignment 1

455 Words | 2 Pages### Mat 540 Week 1 Assignment

1004 Words | 5 Pages### Lab 1.1 Essay

280 Words | 2 Pages### Chemistry 3.03 Essay

350 Words | 2 Pages### Pt1420 Unit 3 Question Paper

458 Words | 2 Pages### Algebra Unit 4 Unit 10

9534 Words | 39 Pages### Sample Critical Thinking Questions

1039 Words | 5 Pages### P1 Unit 1 Research Paper

2065 Words | 9 Pages### Cis305b Essay

821 Words | 4 Pages