0% found this document useful (0 votes)
19 views6 pages

Brandon Delkash - Variable Tracing Activity

Uploaded by

bdelkash255
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

Brandon Delkash - Variable Tracing Activity

Uploaded by

bdelkash255
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Variable Tracing Activity | CSIM/AC 1

Cedar Park Middle School


Mr. Schieferstein
Rm. 1110

1. Complete the trace table using the algorithm:

X = 60
Y = 30
X=X/Y
Y=X*3
X=0

X Y

60

60 30

2 30

2 6

0 6

2. Complete the trace table using the algorithm:

X = 10
Y=5
X=X+Y
Y=X-Y
X=2*Y

X Y

10 null

10 5

15 5

15 5

10 5
Variable Tracing Activity | CSIM/AC 2
Cedar Park Middle School
Mr. Schieferstein
Rm. 1110

3. Complete the trace table using the algorithm:

X = 10
Y=2
Z=X*Y
X=Z
Y=X+6

X Y Z

10 null null

10 2 null

10 2 20

20 20 20

20 26 20

4. Complete the trace table using the algorithm:

X=5
Y=8
Z=X*Y/2
Y = Z + 10
X=Y/5

X Y Z

5 8

5 8 20

5 30 20

6 30 20
Variable Tracing Activity | CSIM/AC 3
Cedar Park Middle School
Mr. Schieferstein
Rm. 1110

5. Complete the trace table using the algorithm:

A = true
B = false
C=A
A=B
C = false

A B C

true

true false

true false true

false false true

false false false

6. Complete the trace table using the algorithm:

C = true
A=C
B=A
A = false
C = false

A B C

true

true true

true true true

false true false

false true false

7. Complete the trace table using the algorithm:


Variable Tracing Activity | CSIM/AC 4
Cedar Park Middle School
Mr. Schieferstein
Rm. 1110

firstName = John
lastName = Smith
fullName = A + “ “ + C
firstName = Jane
lastName = Doe

firstName lastName fullName

John

John Smith

John Smith John Smith

Jane Smith John Smith

Jane Doe John Smith

8. Complete the trace table using the algorithm:

firstName = Mary
lastName = Lee
fullName = A + “ “ + C
firstName = Susan
firstName = Sarah

firstName lastName fullName

Mary

Mary Lee

Mary Lee Mary Lee

Susan Lee Mary Lee

Susan Sarah Mary Lee

9. Complete the trace table using the algorithm:


Variable Tracing Activity | CSIM/AC 5
Cedar Park Middle School
Mr. Schieferstein
Rm. 1110

num1 = 10
num2 = 5
sum = num1 + num2
num2 = sum - num2
sum = num1 + num2

num1 num2 sum

10

10 5

10 5 15

10 10 15

10 10 20

10. Complete the trace table using the algorithm:

num1 = 3
num2 = 4
sum = num1 + num2
num2 = sum * num2
sum = num1 + num2

num1 num2 sum

3 4

3 4 7

3 28 7

3 28 31

Bonus: Complete the trace table using the algorithm:

A = 100
Variable Tracing Activity | CSIM/AC 6
Cedar Park Middle School
Mr. Schieferstein
Rm. 1110

C = 50
B=A-C
D=A+B+C
A = 20
B=A*5
D=A*2/4
C=A+B-D

A B C D

100

100 50

100 50 50

100 50 50 200

20 50 50 200

20 100 50 200

20 100 50 10

20 100 110 10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy