Font size
WorksheetsExtended Quiz: Functions, Machines, and EVTOLs
Total questions: 21
Worksheet time: 24mins
In CodeHS, why do we create functions like turnRight()?
To make our code longer
To repeat the same code over and over
To create shortcuts and reuse steps easily
To make the computer run slower
Which of the following is the correct way to define a function in CodeHS?
Which of the following is the correct way to define a function in CodeHS?
What is one advantage of using functions in your programs?
They make your code confusing.
You only write the steps once, then you can call the function many times.
Functions erase your old code.
Functions make your computer louder.
Machines and coding both use inputs and outputs. Which example shows this correctly?
Input: Press on button → Output: TV screen turns on
Input: pressing a keyboard key → Output: nothing happens
Input: eating food → Output: the lights in your house turn on
Input: CodeHS program → Output: the computer deletes itself
EVTOLs (electric vertical takeoff and landing vehicles) are being developed to…
Replace bicycles in schools
Fly like drones but carry people like cars
Replace trains underground
Make LEGO machines work automatically
Which of these is an example of input and output in an EVTOL?
Input: pilot presses joystick → Output: vehicle tilts forward and moves
Input: car horn honks → Output: the sky turns blue
Input: wheels spin → Output: the vehicle eats fuel
Input: program crashes → Output: EVTOL disappears
What is the purpose of design in engineering?
To make random creations with no purpose
To create something new/unique with a purpose
To copy other people's work
To avoid using safety measures
Which statement about design is true?
A. Design is always done once and finished forever
B. Design is never done; it can always be improved
C. Design is random and has no purpose
D. Design cannot include safety considerations
What do machines do?
Make work harder by adding more steps
Make work easier by changing the way force is used
Eliminate the need for force completely
Make random movements with no output
Why is safety important in design?
To make projects take longer
To make projects look cooler
To protect people while using machines or projects
To avoid making changes to a project
In your Karel program, what does a function act like?
A. An ingredient in a recipe
B. A recipe you can use again and again
C. A random guess
D. A mistake in the code
Which is an example of inputs and outputs working together?
Input: pull lever → Output: LEGO car rolls forward
Input: lights turn on → Output: you press a button
Input: random design → Output: nothing happens
Input: press keyboard → Output: screen stays blank
15. Machines and functions are similar because:
Both take an input and produce an output.
Machines are physical, while functions are mathematical.
Functions always require electricity, machines do not.
Machines can think, but functions cannot.
In what step in the engineering design process would you try to make your design even better?
Ask
Imagine
Plan
Create
Improve
This is this step in the engineering design process where you begin to build your design.
Ask
Imagine
Plan
Create
Improve
In what step would you draw a picture of your ideas?
Ask
Imagine
Plan
Create
Improve
What is the First Step of the Engineering Design Process
Testing Solutions
Designing Solutions
Identifying the Problem
Planning Solutions
When writing functions, how many times do you need to write the function?
Every time you want to use it.
Only once, at the start.
Only 3 times
Every time you need Karel do something
Q: After you define a function, how many times can you call it in your program?
A. Only once
B. Twice, no more
C. As many times as you want
D. You cannot call it again
Q: Write a function that describes roasting a marshmallow. Be sure to include everything that a normal function would have.
