Skip to content

Basics of NumberScript

Now in this part we're going to cover the basics of NumberScript

Part 1

Now in the NumberScript program there are 3 parts

  • Start
  • Code-Body
  • End

So the start of the program is started with 0 and ends with 1, The code body is in-between those 2

example:

0 2Hello 1

0
2Hello
1

Ok now we can mode on to displaying stuff.

Part 2

ok, to display a string in the program we can use the 2 command.

0 2Hello 1

^In the above example it will print Hello

Also remember don't add any spaces or anything to the string!

You can display output of basic math equations with ^

Can: +(add), -(subtract), /(divide), *(multiply)

0 ^100+50 1

this should display,

150

Quick-Note: You can't have different operations in a single ^

      : meaning you can do 1+1+2 but not 1+1*2

      : Also NO SPACES.

you can also display random numbers and set them to variables

Example of displaying a random number between 1 to 5:

*1!5

Exercises

Here are some exercises to flex your new found knowledge

1) displaying a sentence

Here is your first exercise, Try to display a sentence. using the 2,

Examples of a sentence,

  • Hello-How-are-you?
  • Hi_What's_your_name?

2) Adding

Here is your second exercise. Display 2 numbers then display the total (using 2 and ^)

Number1:5
Number2:10
Total:15

ok, now that's finished we can move on to variables!.