Code segments are sections of a computer program that contain a set of instructions to be executed. They can be as short as a single line or as long as several lines.
Think of code segments like individual steps in a recipe. Each step tells you what to do, and when combined together, they create the entire recipe.
Statements: Statements are individual instructions within a code segment that perform specific actions. They can include assignments, loops, conditionals, and function calls.
Inputs: Inputs are values or data provided to a code segment for processing. They can come from the user or other parts of the program.
Functions: Functions are reusable blocks of code that perform specific tasks. They can take inputs, process them, and produce outputs.
Study guides for the entire semester
200k practice questions
Glossary of 50k key terms - memorize important vocab
© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.