1/16
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
program
a collection of program statements that performs a specific task when run by a computer; often referred to as software
code segment
a collection of program statements that are part of a program
program behavior
how a program functions during execution; is often described by how a user interacts with it
program output
any data sent from a program to a device; can come in a variety of forms, such as tactile, audio, visual, or text
syntax error
a mistake in the program where the rules of the programming language are not followed
runtime error
a mistake in the program that occurs during the execution of a program; programming languages define their own run-time errors
Ex. a loop that doesn’t stop
logical error
a mistake in the algorithm or program that causes it to behave incorrectly or unexpectedly; this is the hardest type of error to find because must do a lot of testing
Ex. Spelling a color differently in a way where it’s still valid most of the time but in one case isn’t
program documentation
a written description of the function of a code segment, event, procedure, or program and how it was developed
program can be described broadly by what it does, or in more detail by both what it does and how the program statements accomplish this function
comments
a form of program documentation written into the program to be read by people; do not affect how a program runs (not all programming environments allow them)
In CMU, type a # and the computer will skip everything from this to the end of the line
How are color names formatted? How is no color formatted?
color names are strings - in single or double quotes
no color: type None (no quotes, uppercase)
In what order does the computer draw shapes?
new shapes are drawn on top of previous shapes in the code
rgb
red, green, blue; the 3 numbers we give are the amount of red, green, and blue to mix together to create our color - each can be between 0 and 255
fill = rgb(#, #, #)
How do you format gradients?
fill = gradient(“color”, “color”, start = “position”)
can replace “color” with rgb(#, #, #)
default start position is center; see other positions at bottom of reference sheet
How does roundness work for stars?
can be set to any number between 0 and 100; 0 = spikier, 100 = rounder
On the reference sheet, what does value as a Label parameter mean?
the text goes here in quotes (a string)
What fonts can be used in labels?
“arial” (default), “caveat”, “cinzel”, “grenze”, “monospace”, “montserrat”, “orbitron”, “sacramento”
How do you make a label bold or italic?
bold = True
italic = True