Computer Programming Name -
ACSL - WDTPD worksheet #2 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 = 100 School$ = "Wyomissing" Character$ = "b"
Sum = 3 Place$ = "Reading" Phrase$ = "To_be_or_not_to_be."
Real = -34.56 Car$ = "Mercury" x = 500
Income$ = "32,345" Fish$ = "Trout" Name$ = "John_Doe_"
__________ 1. ABS(Real) - INT(x)
__________ 2. LEFT$("hello", 2, Total)
__________ 3. VAL(STR$(Total))
__________ 4. SGN(Character$)
__________ 5. INT(Real)
__________ 6. MID$(STR$(x), 2, LEN(Character$))
__________ 7. RIGHT$(Name$, SGN(Sum))
__________ 8. SQR(LEN(School$) - 1)
__________ 9. VAL(RIGHT$(STR$(100-45), 1))
__________ 10. Total - LEN(Name$) + 3