Expand Cut Tags

No cut tags
topaz: (Morgan - sneer)
[personal profile] topaz
I think this is the new generation's version of writing lines on the blackboard:

Dear Mom & Dad,
I had to stay in for recess because I was making the other kids laugh in
class by saying silly things loudly. I will try to behave next time by not
talking loudly in class.  Of course, the temptation will be too much, but I
will still try hard.  I will be respectful to my teacher.

From,
Morgan

Unfortunately I'm just the wrong person to impose discipline on this one. Especially if I keep giggling whenever I think about it.

Date: 2008-12-04 06:45 pm (UTC)
From: [identity profile] docstrange.livejournal.com
You know the school's lost control when he writes his first while/do loop in response to punishment of writing 1000 times, "I will not make the other kids laugh by talking loudly in class."

Date: 2008-12-04 07:20 pm (UTC)
From: [identity profile] pulito.livejournal.com
What is a "while/do loop"?

Date: 2008-12-04 10:14 pm (UTC)
ceo: (Default)
From: [personal profile] ceo
It's a way of doing something repeatedly in a computer program. For this purpose I'd use a for loop, though. Here it is in C:
for(i = 0; i < 1000; i++) 
{
  printf("I will not make the other kids laugh by talking loudly in class.\n");
}
That first line means "do this repeatedly, incrementing the variable i every time, and stop when i gets to 1000".

There's a Fox Trot comic where Jason does precisely this, writing more or less the above on the blackboard, and the teacher says "Nice try."
Edited Date: 2008-12-04 10:16 pm (UTC)

Date: 2008-12-04 11:03 pm (UTC)
From: [identity profile] pulito.livejournal.com
Huh. Well, I think I understand that, but barely.

Thanks! :)

Date: 2008-12-04 11:06 pm (UTC)
From: [identity profile] docstrange.livejournal.com
Just so!

(Also, I told my wife as I wrote it, "Someone will quibble and express their preference for a 'for' loop, absent any language context in my post." 8-)

Date: 2008-12-05 04:19 am (UTC)
ceo: (Default)
From: [personal profile] ceo
"Someone will quibble and express their preference for a 'for' loop, absent any language context in my post."

I live to serve. :-)

May 2018

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930 31  

Most Popular Tags

Style Credit

Page generated Mar. 5th, 2026 11:28 am
Powered by Dreamwidth Studios