Scratch Lab #7
Name: Yohannes Dagne
Period: 7
Assignment: Lab #7
Lab Overview
Create a block that takes four parameters. These parameters should stand for the x and y coordinates for two points. Use the parameters to calculate the distance between two points. Create a block that takes one parameter, feet. If there is at least one mile (i.e. more than 5280 ft) the measurement should be converted to miles. If there is less than one mile, the measurement should be converted to inches.
My Solution
I completed the required tasks that each problem asked me to do.
Prob. 1
Problem 1
Prob. 2
Problem 1
Questions
- What are two advantages to using blocks for code repetition?
- This helps us identify bugs easier/ faster and make our code look much cleaner.
- What are parameters?
- A number whose value is relative to a concept
- Give an example of a formula that takes at least one parameter.
- Give an example of a situation where no parameters are needed
- There are certain situations where parameters are not needed. One such situation would would when there are values that are definite.
- Explain what you think the following program does? How do blocks make this easier to understand? Explain what you would expect within each block.
- The program, is completely not understandable. It only tells us what "alpha_order" does but not the other types of blocks. There should be a whole block for each command withing "alpha_oder"