Elsie is looking through her classmate's program and sees a procedure
called heightenEmotions:
PROCEDURE heightenEmotions (myEmotion)
moreEnergy - CONCAT (myEmotion, "!!!")
moreVolume - UPPER (moreEnergy)
RETURN moreVolume
}
That procedure manipulates strings using two built-in procedures, CONCAT
for concatenating two strings together, and UPPER for converting a string
to uppercase.
Elsie then sees this line of code:
heightenEmotions ("im mad")
After that line of code runs, what will be displayed on the screen?
Choose 1 answer:
im mad!!!
A
IM MAD
B
C
Nothing will be displayed
IM MAD!!!
D
im mad
E
The procedure
"heightenEmotions" manipulates the input string by first concatenating "!!!" to it and then converting the entire string to uppercase. Let's break down the steps:
1. The input string "im mad" is concatenated with "!!!" to form "im mad!!!".
2. The resulting string "im mad!!!" is then converted to uppercase, resulting in "IM MAD!!!".
Therefore, the output displayed on the screen will be "IM MAD!!!".
The correct answer choice is:
Not the question you are looking for? Ask here!
Enter question by text
Enter question by image
Unlock Smarter Learning with AskSia Super!
Join Super, our all-in-one AI solution that can greatly improve your learning efficiency.