Scratch+Coding+Exercises

For each of the following: STEP 1: Write the problem specification in your jotter STEP 2: Write a list of variables you will use (and say whether each is an Integer, Real, String or Boolean) STEP 3: Write the program in Scratch STEP 4: Copy your program into your jotter and show your teacher

1. Write a program which:
 * asks the user to enter their name (name)
 * asks the user to enter a first number (number_1)
 * asks the user to enter a second number (number_2)
 * asks the user to enter a third number (number_3)
 * adds all 3 numbers and displays the user's name (name) and the result (total)

2. Write a program which: >
 * asks the user to enter their name (name)
 * sets (total) to 0
 * repeats 5 times
 * asks the user to enter a number (number
 * adds the number to the total


 * displays the user's name (name) and the result (total)

3. Write a program which:
 * asks the user to enter a first number (number_1) between 1 and 20
 * asks the user to enter a first number (number_2) between 1 and 20
 * if the first number is bigger than the second number, then display "First number is bigger"
 * if the second number is bigger than the first number, then display "Second number is bigger"

Extension Adapt the program to display "Numbers are equal" if they are both the same

4. Write a program which:
 * asks the user to enter a number (number_1) between 1 and 20
 * selects a random number (random_number) between 1 and 20
 * if the user's number is bigger than the random number, then display Your number is bigger"
 * if the random number is bigger than the user's number, then display "My number is bigger"