Term
What Three parameters does open_window require. |
|
Definition
The window width in pixels.
The window height in pixels.
The text that will appear on the title bar. arcade.open_window(600,600,'Drawing Example') |
|
|
Term
|
Definition
with a hash mark # or with three single quotes or double quotes ''' Comment''' or """Comment""" Three quotes allow for multiline comments |
|
|
Term
|
Definition
you can import a library by using the import command import arcade or from arcade import * The star means import all. |
|
|
Term
|
Definition
A means by which we give the computer commands print('Hello') is the print function. We can define functions |
|
|
Term
|
Definition
A line of code in Python. It includes the function name, parentheses, numbers, text and everything else required to call the function or perform some other operation. |
|
|
Term
Application Program Interface or “API” |
|
Definition
The names of the functions, the order of the parameters |
|
|
Term
start_render, finish_render |
|
Definition
These commands tell the Arcade library when you are about to start drawing (start_render), and when you are done drawing (finish_render). |
|
|
Term
methods for drawing color |
|
Definition
arcade.csscolor.SKY_BLUE arcade.color.AQUAMARINE arcade.color(255,255,255) RGB |
|
|
Term
What base does a computer use and an example of a byte |
|
Definition
|
|
Term
How many colors can a 32 bit computer display |
|
Definition
|
|
Term
|
Definition
drawing of circles, ellipse, triangles, rectangles and polygons |
|
|
Term
code for drawing primitives |
|
Definition
draw_rectangle_filed # Tree trunk # Center of 100, 320 # Width of 20 # Height of 60 the code is arcade.draw_rectangle_filled(100,320,20,60,arcade.csscolor.SIENNA |
|
|
Term
|
Definition
you need the x coordinate, y coordinate, center, and color arcade_draw_circle_filled(200,100,60,(250,250,250) |
|
|
Term
|
Definition
# Draw an ellipse and rect with # a center of (300, 300) # width of 350 # height of 200 arcade.draw_rectangle_outline(300, 300, 350, 200, arcade.csscolor.BLACK, 3) arcade.draw_ellipse_outline(300, 300, 350, 200, arcade.csscolor.RED, 3) |
|
|
Term
|
Definition
# Another tree, with a trunk and arc for top # Arc is centered at (300, 340) with a width of 60 and height of 100. # The starting angle is 0, and ending angle is 180. arcade.draw_rectangle_filled(300, 320, 20, 60, arcade.csscolor.SIENNA) arcade.draw_arc_filled(300, 340, 60, 100, arcade.csscolor.DARK_GREEN, 0, 180) |
|
|
Term
|
Definition
# Another tree, with a trunk and triangle for top # Triangle is made of these three points: # (400, 400), (370, 320), (430, 320) arcade.draw_rectangle_filled(400, 320, 20, 60, arcade.csscolor.SIENNA) arcade.draw_triangle_filled(400, 400, 370, 320, 430, 320, arcade.csscolor.DARK_GREEN) |
|
|
Term
|
Definition
# Draw a tree using a polygon with a list of points arcade.draw_rectangle_filled(500, 320, 20, 60, arcade.csscolor.SIENNA) arcade.draw_polygon_filled(((500, 400), (480, 360), (470, 320), (530, 320), (520, 360) ), arcade.csscolor.DARK_GREEN) |
|
|
Term
|
Definition
start point, end point, color and optional line thickness. arcade.draw_line(500, 550, 400, 550, arcade.color.YELLOW, 3) |
|
|
Term
|
Definition
The text to draw is the first parameter. The x, y location of the text is are next two. Finally the color and font size come next. # Draw text at (150, 230) with a font size of 24 pts. arcade.draw_text("Arbor Day - Plant a Tree!", 150, 230, arcade.color.BLACK, 24) |
|
|
Term
|
Definition
Make it easier to identify what is defined arcade.draw_arc_outline(center_x=300, center_y=340, width=60, height=100, color=arcade.csscolor.BLACK, start_angle=0, end_angle=180, border_width=3, tilt_angle=45) |
|
|
Term
|
Definition
a module is a file consisting of Python code. A module can define functions, classes and variables. A module can also include runnable code. |
|
|
Term
|
Definition
a line of code in Python which includes the function name, parentheses, numbers, text and everything else required perform an operation? |
|
|
Term
labray name and function name are separated by a |
|
Definition
|
|
Term
PEP-8 says that we should |
|
Definition
Put a space after a comma. |
|
|
Term
What function do we use to open a window |
|
Definition
arcade.open_window(600, 600, "Drawing Example") |
|
|
Term
What do we call the names of the functions and parameter order that make up how we interface with a library? |
|
Definition
Application Program Interface or “API” for short |
|
|
Term
How do we set the background color |
|
Definition
arcade.set_background_color(arcade.csscolor.SKY_BLUE) |
|
|
Term
What function name must happen before you start drawing? |
|
Definition
|
|
Term
What function name happens after drawing? |
|
Definition
|
|
Term
to keep a program running |
|
Definition
|
|
Term
Colors are specified using three numbers that represent what? |
|
Definition
|
|
Term
If a color is turned all the way OFF, what number is used?
If a color is turned all the way ON, what number is used? |
|
Definition
0 color is off 255 color is all the way on |
|
|
Term
A bit can hold what two numbers? |
|
Definition
|
|
Term
A byte is made up of how many bits? |
|
Definition
|
|
Term
A byte can hold how many different combinations of numbers? |
|
Definition
a byte is a bits and can hold 2^8 or 256 colors. |
|
|
Term
What do we call the main “brain” of the computer where all the processing happens? |
|
Definition
CPU or Central Processing Unit |
|
|
Term
Instructions for a CPU are made up of a long sequence of what? |
|
Definition
|
|
Term
What is the name of the native language for CPUs? |
|
Definition
|
|
Term
What is the difference between a CPU and a GPU? |
|
Definition
The GPU is a processor whose primary purpose is to run graphics displays. |
|
|
Term
Commands with a GPU can be processed by hundreds or thousands of what? |
|
Definition
|
|
Term
If machine language is a first-generation language, what is the second-generation language? |
|
Definition
|
|
Term
What do we call the file that programmers type commands into? |
|
Definition
|
|
Term
What is the name of the program that turns assembly language into machine language? |
|
Definition
A compiler turns human-readable code into machine code. |
|
|
Term
Third-generation languages usually fall into what three categories? |
|
Definition
Compiled, Interpreted, Runtime Environment |
|
|
Term
|
Definition
The computer takes the original source code, and uses a compiler to translate it to machine code. The user then run the machine code. The original source code is not needed to run the program. “C” is an example of a language that works this way. So is the 2GL assembly language we just talked about. |
|
|
Term
|
Definition
The computer looks at the source code and translates/runs it line-by-line. The compile step is not needed, but the user needs both the source code and an interpreter to run the program. Python is an example of an interpreted language. |
|
|
Term
|
Definition
Languages such as Java and C# take source code, and compile the source code to a machine language. But not the language of your actual machine, they compile to a virtual machine. This is a separate program that acts as a layer between the real machine and the compiled code. This allows for better security, portability, and memory management. |
|
|
Term
What is the difference between a compiler and an interpreter |
|
Definition
Interpreter translates just one statement of the program at a time into machine code. Compiler scans the entire program and translates the whole of it into machine code at once. |
|
|
Term
What generation of language is Python? |
|
Definition
|
|
Term
What are some of the most popular languages in use today, according to the TIOBE Index? |
|
Definition
Python, Java, C, C#, Ruby |
|
|
Term
|
Definition
multiplication, division, add, subtract, power, integer division, modulus(gives remainder) |
|
|
Term
integer division // takes a number and divides it by another and returns and integer rounding down |
|
Definition
|
|
Term
What is the code to add 1 to x? (That is, actually change the value of x.) |
|
Definition
|
|
Term
Give an example of printing a variable, including additional text that labels what it is. |
|
Definition
r = 3 print ("r = " + str(r) |
|
|
Term
|
Definition
A Python library is a reusable chunk of code that you may want to include in your programs/ projects |
|
|
Term
|
Definition
|
|