The building blocks of programming
Every program in the world has been built by using the three basic building blocks (sequential, branching, and looping instructions).
password$ = “”
WHILE password$ <> “open”
PROMPT “Enter your password”; password$
IF password$ = “open” THEN
NOTICE “Welcome to the FBI’s secret computer network”
ELSE
NOTICE “Try again”
END IF
WEND
END
you can break this program in the following parts:
password$ = “”
WHILE password$ <> “open”
PROMPT “Enter your password”; password$
IF password$ = “open” THEN
NOTICE “Welcome to the FBI’s secret computer
network”
ELSE
NOTICE “Try again”
END IF
WEND
END
password$ = “”
WHILE password$ <> “open”
PROMPT “Enter your password”; password$
IF password$ = “open” THEN
NOTICE “Welcome to the FBI’s secret computer
network”
ELSE
NOTICE “Try again”
END IF
WEND
END
password$ = “”
WHILE password$ <> “open”
PROMPT “Enter your password”; password$
IF password$ = “open” THEN
NOTICE “Welcome to the FBI’s secret computer
network”
ELSE
NOTICE “Try again”
END IF
WEND
END
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply