AP Computer Science 2.2 Program Development
Recommendation
Want a study guide too?
AP Computer Science 2.2 Program Development. Which is a correct { /* Implementation */ }for the print() method?
AP | AP Computer Science |
AP Computer Science | Program Development |
Computer Science | AP Computer Science |
Language | English Language |
Program Analysis | Algorithm Analysis |
Test Prep | AP Computer Science |
Transcript
correct implementation for the print method well we can eliminate a few [Potential answers appear]
answers right off the bat whenever connecting different strings in
a print command we must use a plus sign so choice diesel ended because penguin
name must be in quotation mark otherwise the computer will interpret it as a [Man hitting laptop]
command instead of a string ID now let's take a look between choices see an e [Girl looking at flowers through magnifying glass]
well choice C uses a print line but also puts a new line command in the statement
this will make the cursor jump down a line twice printing a full extra blank
line we wanted to be on the line immediately under the penguin name the
choice E does this nicely by using a friend which won't make the cursor jump
a line and then using the new line command to make it jump one line below
the next time we'll hear about carriage back out of the snow running competition
he got cold feet [Penguin standing on block of ice]