Your simple program
Write a program like the tip calculator, length converter, and Aussie Rules scorer. When a button is pressed, it should take some input from the worksheet, do some calculation(s), and output to the worksheet, using the IPO pattern. Input and output can be numeric and/or string.
Add a comment for each part of your IPO code, like "Arr! Here be input, maties!" You don't have to do Pirate, though.
Use good variable names,
Option Explicit, and other things you need.
Upload your worksheet.
Write a program that asks the user about their name, their dog's name, and shows a message. All input and output is with dialogs. First, the program asks for the user's first name:
Then the last name:
Then the dog's name:
That's all the input. After that, your program shows a message, that puts together the data:
Format the message exactly, with the right spacing, and the line breaks.
Notice something else you need to do. The user might type extra spaces around their input, like they did with the dog name.
Make sure the extra spaces do not affect the output.
Another run sequence:
Upload your worksheet. The usual coding standards apply. Good variable names, like that.
Write a program to help users work out how much fabric they need to make a covering for their fave cylinder. The input should be from the worksheet, like this:
I asked Google how to work out the surface area of a cylinder. It said:
Here's the output for that data:
Problem, though. The input is in centimeters. The output should be in square meters. I asked Google about that, too.
Another example. The input:
Upload your workbook. The usual standards apply.
Write a program that computes how many experience points (XP) a player earns in a game. They earn XP from killing things like rats, and zombies. You can download this starting workbook.
Here's the start screen:
The user enters numbers in the cells, and clicks the button. Here's some sample output:
Here's what each critter is worth:
Upload your solution. The usual coding standards apply.
Write a program to compute the price of a goaty food order. You can download a starting workbook. Here's what it looks like to start:
Users type in the number of each item they want to order. Your program works out the total food cost, total drink cost, total service charge, and the overall total. Here some output:
Write a program to do this.
Important! Your code should get all the prices from the worksheet. Your code should not have 14.95 anywhere in it. Nor 2.95. Nor 0.75. Etc.
You don't need to round the prices to the nearest cent. If you want to, this page explains how.
Include comments identifying each of the three parts of the program.
Upload your solution. The usual standards (variable name standards, indenting, maybe other stuff you've learned) apply.
Write a program to work out how many calories a goaty workout will burn. You can download a start worksheet. It looks like this:
Users fill in the green cells, and click the button. They see the calories their workout would burn. Here's how much toning exercises burn per rep:
|Exercise||Calories for one rep|
Calories for a toning exercise are the number of sets, times the reps per set, times the value above, like 20.
Here's the burn for cardio:
|Exercise||Calories per minute|
Here's some output:
Upload your solution to this site, not to Moodle. The usual coding standards apply.
The Bonnie Burns Effect
Nobody Listens to Paula Poundstone is your comedy field guide to life. The podcast features Paula, her cohost Adam (who is on every show), Toni, and the redoubtable Bonnie Burns.
Paula's assistant Wendell noticed the more Bonnie is on the show, the more merch they sell, but the lower their sponsorship revenue is. Sponsors are nervous about Bonnie, who might, for example, use "alternative facts" about her age to get a better deal, or lure Toni into a life of breakfast crime.
Bonnie also drives some people to despair. The show has had to pay for psychiatric care for Adam and Vic, the show's sound editor.
Some of Bonnie's antics pose legal risks, such as a threatened lawsuit by the estate of Zero Mostel. The show seeks legal advice before releasing a Bonnie-ridden episode.
Write a VBA program to estimate the revenue effect of each minute Bonnie is talking on the show. You can download a start worksheet. It looks like this:
The user fills in values in the input part, above the Run button. They click the button, and get the output.
- Add in the effect of merch and sponsor changes.
- Adam needs two hours of psychiatric care for each minute Bonnie talks.
- Vic needs three hours per minute, since he has to listen to Bonnie speak more than once while he's editing the show.
- The show needs one hour of legal advice for each minute Bonnie talks.
Here's some sample output:
Use the IPO pattern. Add a comment identifying each of the three parts of the program.
Upload your workbook with the VBA code here. The usual standards (variable naming, indentation, secluded cells, explicit variables) apply.