Petit Comp-- Tutorial 01: PRINT and simple INPUT

Introduction
Welcome to the first a series of Petit Computer Tutorials, created to be easy to follow, so you can start programming faster! I hope that you learn from these tutorials! This will be covering Petit Computer for the DS, but it should work on other devices as well.

~boxtropica

"Write a Program"
Oh, hi there. I heard that you like Mudkipz. I also heard you like Petit Computer. If you like Petit Computer, you wanna learn how to program for it, right? OK, then! Let's boot up Petit Computer!

Chances are you've already looked around the Petit Comp application, launched a few apps in "View Gallery", and maybe even downloaded games with the QR scanner. Either way, read on!

Here we are, at the Petit Computer 'Home Menu'. Wonderful, isn't it? Ignore it's greatness, it'll distract you with the hypnotizing scrolling words in the background. Go ahead and give the 'Write Program' button on the touch screen a good punch. (Or touch, if you don't want to break your DS.) Wow! A terminal-like design? Don't be intimidated, it's very BASIC to understand. When you open up the 'Write Program', it defaults to 'Run'. 'Run' allows you to LOAD, SAVE, and RUN programs. It can also test commands. Besides 'Run', there is also 'Edit', but that's for later.

PRINT Command
Still in 'Run'? Good! Now, using the keyboard on the touch screen, type in the following: PRINT "STUPID TOUCH SCREEN KEYBOARD. WHERE'S MY REAL KEYBOARD?" Ok, now hit the 'Enter' button on the horrid keyboard. You should see something like this: STUPID TOUCH SCREEN KEYBOARD. WHERE'S MY REAL KEYBOARD? See that pop up? Good. That means that your DS isn't broken.

What did I have you type in, you asked? It's fairly obvious. (if the command doesn't give it away, the output should've...)

'PRINT', followed by a string/number, puts that text on the screen for all to read. It's not very handy in 'Run', but it will be in 'Edit'. "But wait, what's a String/Number have to do with PRINT?" Let me explain.

Strings & Numbers
Try typing PRINT 5 in 'Run', then hit enter. What do you see? This: 5 Get it? PRINT puts whatever you put after it onto the screen!

Now, let's try PRINT HI And you see: 0 "What? Why did '0' pop up?" Well, my friend, that is because you entered a string as a number!

Strings are text, and used in commands such as 'PRINT', need to be surrounded with quotation marks.

Numbers can be used just the same as strings, just using numbers (Of course) and without quotation marks.

Here is an example: PRINT "Hi!" Becomes- Hi! And PRINT 7 Becomes- 7 Of course you could just 'PRINT' numbers as strings (quotations), but not vice versa. Besides, why would you want to spend an extra 0.6 seconds typing two quotation marks when you could spend that time doing other things?

You may wonder "Why even have numbers exsist when you could just have numbers as a string?"

Well, that is because of MATH. Math is very handy, and very simple. Example- PRINT 7+3 You should see 10 It's that easy! 'PRINT' displays what follows it, and since 7+3 follows it, it goes ahead and displays the answer. (If you want 7+3 to be displayed, make it a string)

This also works with subtraction (-), division (/), and multiplication (*).

Outward
Well, I hope you learned how to use PRINT and about Numbers+Strings. If you need any help (confused, etc.) feel free to contact me at "boxtropica@hotmail.com"! Happy Petit Computing!

~boxtropica