Below are several simple mathematical calculations that you might do with students. Complete all three of the following simple programs. For each, code them up in Scratch similar to the Fahrenheit to Celsius example we looked at the other day. For now you should save these in your workspace in scratch. Later I will ask you to submit your answers for grading.
- Calculate a person’s weekly pay check by asking them for their hourly wage and the number of hours they worked (you can assume no overtime so hours*wage).
If I work 20 hours at $12.50 an hour than I would receive $250.
- Now let’s assume that they DID work overtime. Calculate a person’s weekly pay check by asking them for their hourly wage and the number of hours they worked. They make their hourly wage for the first 40 hours and time and a half for everything after 40 hours. NOTE, you may ASSUME that the user puts in a value of 40 or higher for the hours worked.
If I work 50 hours at $12.50 an hour than I would receive $687.50.
Calculate a person’s BMI using the following formula which uses weight in kilograms and height in meters.
A mass of 77 kg and a height of 1.67 meters produces a BMI of approximately 27.6
Making Sure Both Students Have the Solutions
You will both want to have access to this code for later activities. As such, I want you to make sure that both people have access to this code. There are two ways to do this. You might try both ways just to see how they both work:
1. Sharing and Remixing
- Partner #1 (the person whose account was used for the assignment) should click "Share" just like you would before adding an assignment to the homework gallery).
- Partner #1 records the URL for this program.
- Partner #2 logs on to his/her account.
- Partner #2 types in the URL for the program.
- Partner #2 clicks the "remix" button for the program. This means that Partner #2 now as a COPY of the program.
- At this point, if you like, Partner #1 could go back to the program and DE-select the share option. This will now make the original program private again.
2. Downloading and Uploading
- Partner #1 selects "Dosnload to your computer" from the File menu and selects to save it on the desktop or a flash drive:
- Partner #2 logs in to his/her account
- Partner #2 goes to a new and blank file (this step is important because you will overwrite this file in the next step. You don't want to accidentely overwrite a project you want to keep).
- Partner #2 selects to "Upload from your computer" from the file menu and uploads the file saved by partner #1.
This method is "better" in that your project is never public. However, it takes a bit more effort and it is possible to accidentely erase a real project. Be careful using this approach.