Computer Programming Name -

ACSL - What Does This Program Do? (WDTPD) worksheet #1 Period -

Using the following numeric and string variable assignments, describe the final values of the expressions below. If the expression is actually a string, include double quotes around the string literal. If the expression is a numeric value do NOT use quotes. Note that an underscore character ( _ ) means a blank space. Write your answers in the spaces provided. If you believe a syntax error would occur, write "Error" as your answer.

Total = 10 School$ = "Wyo" Letter$ = "b"

Sum = 5 Place$ = "Reading" Answer$ = "yes_sir!"

Real = 4.3 Truck$ = "Dodge" x = 5

TaxRate = 0.6 Sport$ = "Cross_Country" Address$ = "360_Evans_Ave."

 

__________ 1. LEN(Truck$)

__________ 2. RIGHT$("Wyomissing_High", 5)

__________ 3. MID$(Answer$, 3, 2)

__________ 4. VAL("345")

__________ 5. STR$(Real)

__________ 6. LEFT$(Place$, x)

__________ 7. INT(TaxRate)

__________ 8. ABS(-230)

__________ 9. SQR(30 + 34)

__________ 10. SGN(Sum)

__________ 11. RIGHT$(LEFT$("Mississippi", 7), 2)

__________ 12. MID$(School$, LEN(Letter$), INT(Sum - Real))

__________ 13. VAL(MID$(Address$, 3, SQR(1))

__________ 14. SGN(0) * 1443456789 / 3

__________ 15. MID$("Scooby_Doo", 5, SGN(0))

Create 5 more tricky problems using the variables above and provide the answers in the space below.

__________ 16.

 

__________ 17.

 

__________ 18.

 

__________ 19.

 

__________ 20.