Sadržaj

► Main page, Previous page

Programming primer

OUTPUT

<font 14px/arial,sans-serif;;inherit;;inherit> Topic: How we find out what data are in computer? </font>

<font 14px/arial,sans-serif;;inherit;;inherit> 7 and 8 period </font>

<font 14px/arial,sans-serif;;inherit;;inherit> Repetition: Drawing </font>

red.jpg

<font 14px/arial,sans-serif;;inherit;;inherit> Means: Put as many grains you want in the red drawer. </font>

<font 14px/arial,sans-serif;;inherit;;inherit> New teaching material: </font>

<font 14px/arial,sans-serif;;inherit;;inherit> Question: What does mean the drawing you see below? (Attention! The direction of the arrow is changed.) </font>

output_slika1.jpg

<font 14px/arial,sans-serif;;inherit;;inherit>This instruction will not represent the request “Empty the red drawer” as somebody could assume. This drawing means: “Check how many grains are there in the reed drawer and write this number in your notebook or on the blackboard, The grains remain in the drawer.”</font>

<font 14px/arial,sans-serif;;inherit;;inherit> The name of such an instruction is OUTPUT. After OUTPUT data remains in Mema, but its contents is copied somewhere outside of Mema, for instance in the notebook. </font>

<font 14px/arial,sans-serif;;inherit;;inherit> A riddle: What you can give away and not lose? Answer: Friendship (Now we can see that data behave is the same way.) </font>

<font 14px/arial,sans-serif;;inherit;;inherit>Assignment: Put in every drawer of your Mema a number of grains (as many you want). Write in your notebook how many grains are there in the next drawers:</font>

output_slika2.jpg

<font 14px/arial,sans-serif;;inherit;;inherit>This is an assignment with many correct answers, because every child fill in his or hers Mema with an arbitrary number of grains. But in the moment when he or she write the numbers, the numbers must be the same as the numbers in drawers given by instructions.</font>

<font 14px/arial,sans-serif;;inherit;;inherit>Assignment: Write (draw) a program which put in every drawer of your Mema a number of grains (as many you want), and then ask you to write in your notebook how many grains are there in red, blue, yellow, black and green drawer.</font>

<font 14px/arial,sans-serif;;inherit;;inherit> Comment: </font> <font inherit/arial,sans-serif;;inherit;;inherit>Students instructions use only colors without text as is our drawings.</font>

<font 14px/arial,sans-serif;;inherit;;inherit> Solution: </font>

output_slika3.jpg

Some additional questions the teacher can ask for better understanding:

<font 14px/inherit;;inherit;;inherit> Assignment: Draw the instruction which will empty the red drawer.</font>

<font 14px/inherit;;inherit;;inherit> Tip: First all have to perceive that this can not be done by OUTPUT instruction.!!!!!</font>

<font 14px/inherit;;inherit;;inherit> Repetition: What does this instruction do??</font>

output_slika1.jpg

<font 14px/inherit;;inherit;;inherit>Answer: Wit this instruction a request is given to write out the contents of red drawer without changing its contents.</font>

red.jpgThe red drawer may be emptied by putting in it 0 grains (none).

PROCESSING

Clicking the link PROCESSING you can go to the next lesson.