These are my programming exercises. Click a link below to be taken to that exercise.
Temperature Converter
Problem: Write a program that converts Fahrenheit temperatures to Celsius.
Plan:
-Ask for user to input Fahrenheit temerature using form "frm1"
-create button "Convert to Celsius"
-Create function myFunction
-Within function create variable x and assign it to the input from frm1
-create variable fahrTemp and assign to the value of var x
-create var celTemp and assign it to conversion equation (fahrTemp-32)*.5556
-Print celTemp to user when button is clicked
Month Number to Name Converter
Problem: Write a program that takes a month number and outputs the month name.
Plan:
-Ask for user to input month number using form "frm1"
-create button "Get Month Name"
-Create function myFunction
-Within function create variable x and assign it to the input from frm1
-create variable monthNum and assign to the value of var x
-create var monthName
-using if else statement assign var monthName to the month correlated with monthNum (i.e. if month == 1, monthName = "January" etc.)
-Output monthName to user when button is clicked
Number Guessing Game
Problem: Write a guessing game where the user has to guess a secret number. After every guess the program tells the user whether their number was too large or too small. At the end the number of tries needed should be printed. It counts only as one try if they input the same number multiple times consecutively.
Plan:
-Create var x and assign it to a random number between 1-1000 by usiing math.random * 1000 and math.floor to round to whole number
-Create var turns and assign it to 10
-create var hint and assign it to "Guess my umber 1-1000"
-create while loop for turns > 0
-create var guess and prompt for input
-if guess is wrong subtract 1 from turns and alert "wrong" and how many turns are left
-if guess is right alert " you win" set turns = 0
-when turns = 0 alert "My number was " + x + "."