What is Computer Science?
using the internet to solve problems using technology to solve human problems
What prints when you execute the following code? x = 12
y = 17
print(x + y)
29
What is a function?
A named group of code that is designed to do a simple task
What is a loop?
A way of repeating code
What do you have to import to make an image?
import simplegui
What is a formal language?
Language that is based on a set of very specific rules for communicating
What is happening in this line of code?
x = 5 * 8
They are being multiplied
What is a Parameter?
Parameters are the extra information set within the parentheses of a function.
What are the two ways to stop a loop?
User input and Count variable
What are the three letters for the basic colors?
RGB
What is the difference between hardware and software?
Hardware is the actual physical computer and software is instructions for the computer and code the computer runs on
What does "**" represent in a basic calculation in python?
It makes the next integer an exponent
In an if statement, how would you write that a number is NOT equal to another number?
!=
Make a count variable using the variable "x".
x=x+1
What are the numbers between to determine a color?
0-255
What do Compilers do?
Translate code to machine language
What math function finds the square root of a number?
sqrt(x)
elif lets you test a second (or third, or fourth…) condition and when the first option that is true happens, the rest are skipped.
What is a For loop?
A loop with a count variable built into it
canvas.draw_line / draw_line
What is a variable?
A name for a spot in the computer’s memory
What would you put at the beginning of your code to make the code input random numbers?
import random
How do you add more than one condition to an if statement?
You can use "and" or, "or"
What outputs when you type?
for n in range(1,4):
print(n)
1
2
3
What function is used to draw a circle
canvas.draw_circle / draw_circle