CS CMU - Unit 1: Intro to CMU Graphics

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/16

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

17 Terms

1
New cards

program

a collection of program statements that performs a specific task when run by a computer; often referred to as software

2
New cards

code segment

a collection of program statements that are part of a program

3
New cards

program behavior

how a program functions during execution; is often described by how a user interacts with it

4
New cards

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

5
New cards

syntax error

a mistake in the program where the rules of the programming language are not followed

6
New cards

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

7
New cards

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

8
New cards

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

9
New cards

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

10
New cards

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)

11
New cards

In what order does the computer draw shapes?

new shapes are drawn on top of previous shapes in the code

12
New cards

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(#, #, #)

13
New cards

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

14
New cards

How does roundness work for stars?

can be set to any number between 0 and 100; 0 = spikier, 100 = rounder

15
New cards

On the reference sheet, what does value as a Label parameter mean?

the text goes here in quotes (a string)

16
New cards

What fonts can be used in labels?

“arial” (default), “caveat”, “cinzel”, “grenze”, “monospace”, “montserrat”, “orbitron”, “sacramento”

17
New cards

How do you make a label bold or italic?

  • bold = True

  • italic = True