TABLE OF CONTENTS

3.1.1.A number

     

    

Take input as a number.

Example 3.1.1

When program start,initialize 0 to “ random” variable and show on textbox when button is clicked.


After execution:

3.1.2.Take input as a letter,word,or line of text.

     

Take input as a letter,word,or line of text.

Example 3.1.2

When program start,initialize “hello” to “random” variable and show on textbox when button is clicked.

After Execution:

3.1.3.Take input as a MIDI note.

     

Take input as a MIDI note.

Example 3.1.3

When program start play a note “60” for “3” beats for 10 times.

3.1.4.Take input as a percentage.

     

Take input as a percentage.

Example 3.1.4

When program start set 50% default value to slider and show the slider value when it moves.

After execution:

3.1.5.Return either true or false.

     

Return either true or false.

Example 3.1.5

Take textbox value and convert it into integer and when “show” button is clicked call a procedure to check whether entered number is even or odd.If number is even ,it will return “true” and display “EVEN” on label otherwise return “false” and display “ODD” on label.

After execution:

a)when user enter 2 in textbox.

b)when user enter 3 in textbox.


3.1.6.Return either true or false.

     

Return either true or false.                  

Example 3.1.6

Take textbox value and convert it into integer and when “show” button is clicked call a procedure to check whether entered number is even or odd.If number is even ,it will return “false” and display “ODD” on label otherwise return “true” and display “EVEN” on label.

After execution:

a)when user enter 2 in textbox.

b)when user enter 3 in textbox.

3.1.7.Create a piece of text by joining together any number of items.

     

Create a piece of text by joining together any number of items.

Example 3.1.7

When button is clicked ,take a textbox value and check whether it is even or odd.If number is even display the values with a message for that we need to concatinate value with message.

After execution:

3.1.8.Convert  the given input to text.

     

Convert the given input to text.

Example 3.1.8

When “show” button is clicked take textbox value and divide it by 2 then convert it into text and display on label.

After execution:

3.1.9.Use the block to convert a string to integer.

     

Use the block to convert a string to integer.

Example 3.1.9

When button is clicked ,take a textbox value and check whether it is even or odd. But whatever is entered by user in textbox is treated as a text so first we need to convert it into integer with help of “convert to int” block.

After execution:

3.1.10.Use the block to convert a string to floating point value.

     

 Use the block to convert a string to floating point value.

Example 3.1.10

When button is clicked ,take a value entered in textbox and divide it by 2 and convert answer into float.Sometime “convert to int” block use roundup(i.e 2.6=3) ,so at this situation “convert to float” block plays important role.

After execution:

 3.1.11.Choose a colour from the palette.

     

Choose a colour from the palette.

Example 3.1.11

When program get started set background colour of label to blue for 5 second.

After execution:

3.1.12.Choose a colour from the palette.

     

Choose a colour from the palette.

Example 3.1.12

When program get started set background colour of label to yellow for 5 second.

After execution:

3.1.13.Choose a colour at random.

     

 Choose a colour at random.

Example 3.1.13

When program start change background colour randomly of label after every 2 seconds forever.

After execution:

3.1.14.Return a random integer between the two specific limits,inclusive.

     

 Return a random integer between the two specific limits,inclusive.

Example 3.1.14

When program start change background colour randomly of label and display a random number between 0 to10 after every 2 seconds forever.

After execution:

 3.1.15.Create a colour with the specified amount of red ,green and blue.     

Create a colour with the specified amount of red ,green and blue.All values must be between 0 and 255.   

      

Example 3.1.15

When program start set background colour of label to specified portion of mixture of red,green and blue colour. 

After execution: