19.04.2017 Views

Learn to Program with Small Basic

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Program</strong>ming Challenges<br />

If you get stuck, check out http://nostarch.com/smallbasic/ for the solutions<br />

and for more resources and review questions for teachers and students.<br />

1. Identify the objects, methods, arguments, and keywords in the following<br />

code snippet. (Hint: the <strong>Small</strong> <strong>Basic</strong> edi<strong>to</strong>r shows keywords in<br />

blue-purple.)<br />

If (<strong>to</strong>day = "Friday") Then<br />

TextWindow.WriteLine("Today is Friday.")<br />

Else<br />

TextWindow.WriteLine("I lost track of what day it is.")<br />

EndIf<br />

2. Write a program <strong>to</strong> display your name in the text window.<br />

3. Write a program <strong>to</strong> display your name in a message box using the<br />

GraphicsWindow object. (Hint: use the ShowMessage() method.)<br />

Introducing <strong>Small</strong> <strong>Basic</strong> 11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!