PG: Lighter edit. Focus on kids' use of structure they've already learned, /using/ what they know. Is this the time for our video to have yet a new background?
On this page, you will create a new block to make the program feel more like a conversation.
gossip response
is a slightly misleading name. Shouldn't it be response header
or something? It doesn't report a complete response. --bhI think it's ok. If you tell me some gossip, my response might be "Oh, wow!" "Yeah? Well, I heard...", etc. and that's what this block offers. --MF, 7/21/19
gossip response
.Because you chose the reporter shape, the block editor opens with a block already attached to the hat block. Whatever input you give to
report
will become the value reported by your new block.
list
as an input to item
.who
, does what
, and who2
.
item
to change "1" to "random".list
with phrases like "Guess what," "I heard," or "Who cares!"A procedure is a named sequence of instructions that may take inputs and may report a value. Some languages call procedures methods or functions. Here are two types of procedures you have seen in Snap!:
PROCEDURE double(x) { RETURN(2 * x) }
Many languages (and the AP CS Principles Exam) use return
instead of report
as the name of the command to give a value back at the end of a function call.
double(5)" means 10.
gossip response
block by clicking it several times. It should behave like the who
, does what
, and who2
blocks.gossip 2
, and insert gossip response
in place of the text "Oh, but...."gossip 2
also.