328 Words2 Pages

Alpha Arnold
PT1420 – Morning
Feb 15, 2014
Unit 3 Assignment 1: Homework
Short answers:
5. What two things must you normally specify in a variable declaration?
You must specify the variable type and an identifier.
6. What value is stored in uninitialized variables?
Some languages assign a default value as 0 to uninitialized variables. In many languages, however, uninitialized variables hold unpredictable values.
Algorithm Workbench
3. Write assignment statements that perform the following operations with the variables a,b,c A. set b=a+2 B. set a=b*2 C. set b=a/3.14 D. set a=b-8
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 in of the following statements? A. Set result = 4+8 B. Set result = 2*2 C. Set result = 8/4 D. Set result = 8-2
5. Write a pseudcode statement that declares the variable cost so it can hold real numbers.
Dim cost1 As Double = 0
6. Write a 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 10 and 14 to the variable total
/*Declare variables
Total=0
A=10
B=14
Begin
Total=A+B
end
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 .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 =

Related

## It104 Wk 4 Hw

432 Words | 2 PagesWhen the module is called, it should display the product of its argument multiplied times 10. Module main() timesTen() Module timesTen Dim Result As Integer Set result = value * 10 Console.ReadLine() End Module 5. Design a module named getNumber, Which uses a reference parameter variable to accept an Integer argument. The module should prompt the user to enter a number and then store the input I the reference parameter variable. 6.

## 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.

## Lab 1.1 Essay

280 Words | 2 PagesRandy Michael NT 1210 Lab 1.1 Professor Chibuzo Onukwufor 4/1/15 Lab 1.1 1: Convert the decimal value 127 to binary. Explain the process of conversion that you used. Decimal Number | Binary Number | Remainder | 127 - | 64 | 63 | 63 - | 32 | 31 | 31 - | 16 | 15 | 15 - | 8 | 7 | 7 - | 4 | 3 | 3 - | 2 | 1 | 1 - | 1 | 0 | Binary | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | Decimal | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | Conversion | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | I took the decimal and divided it by two giving 1 for the remainders and 0 if it did not have a remainder. 2: Explain why the values 102 and 00102 are equivalent. They 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.

## Chemistry 3.03 Essay

350 Words | 2 PagesThe word interpolate means to use a given line graph to find unknown points between the plotted points of the graph. Use your line graph from Part II to interpolate, or estimate, atomic radius of Tin (Sn). I can estimate that it would be around 145. 5. Tin's actual atomic radius is 140 pm.

## Ma-1210 Week10 Lab

279 Words | 2 PagesBegin by writing the corresponding linear equations, and then use back-substitution to solve your variables. 10–1301–8001 159–1 = x-13z=15y-8z=9z=-1 = x-13(-1)=15y-8(-1)=9z=-1 = x=2y=1z=-1 x,y,z=(2 , 1 , -1) Determinants and Cramer’s Rule: 2. Find the determinant of the given matrix. 8–2–12 = 8*2 - (-1)(-2) = 16 - 2 = 14 3. Solve the given linear system using Cramer’s rule.

## 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.

## Sg Math Ddf

758 Words | 4 PagesTest 4 study guide (Show your work) Math 1101 Fall 2014 Name: _____________ 1. Write the given statement in an equivalent logarithmic form. 1) 25=32 2) (23)2=49 3)104=10000 4) 10-2=0.01 5)10b=c 6)ec=v 2. Write the given statement in an equivalent exponential form. 1) log464=3 2) log381=4 3) log0.1=-1 4) logx=6 5) logx=-2 6) lnx=5 3.

## Nt1210 Unit 1 Rfeview Questions

1378 Words | 6 PagesAnswer These Questions: 1. Which of the following is true about 1 bit? a. Can represent decimal values 0 through 9 b. Can be used to represent one character in the lowercase English alphabet c. Represents one binary digit d. Represents four binary digits 2.

## 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.

## Mat 540 Week 1 Assignment

1004 Words | 5 PagesGiven any input (a0,a1,a2,…a2n-1 describe the permutation of the leaves of the recursion tree. (Hint: write indices in binary and see what the relationship is of the bits of the ith element of the original sequence and the ith element of the resulting permutation of elements as they appear on the leaves on the recursion tree.) 3) Timing Problem in VLSI chips. Consider a complete balanced binary tree with n = 2k leaves. Each edge has an associate positive number that we call the length of this edge (see picture below).

### It104 Wk 4 Hw

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

455 Words | 2 Pages### Lab 1.1 Essay

280 Words | 2 Pages### Chemistry 3.03 Essay

350 Words | 2 Pages### Ma-1210 Week10 Lab

279 Words | 2 Pages### P1 Unit 1 Research Paper

2065 Words | 9 Pages### Sg Math Ddf

758 Words | 4 Pages### Nt1210 Unit 1 Rfeview Questions

1378 Words | 6 Pages### Algebra Unit 4 Unit 10

9534 Words | 39 Pages### Mat 540 Week 1 Assignment

1004 Words | 5 Pages