Datatypes
IPO
Variables
Programing
Surprise
100

What is the best data type to store a person's name?

String

(A string can contain a person's name as text)

100

What does IPO stand for?

Input, Process, Output

100

What is a variable used for?

A variable is used to store data that can be accessed or changed by a program

100

What is the output?

userName = "Robert"

if userName == "Rober":

    print("Hello Rober")

else:

    print("Hello Robert")

Hello Robert

100

Name at least 5 programming languages.

Java, Lua, Python, Scratch, C#, C++, C, Javascript, CSS, HTML

200

Name the 4 basic Data types.

- String

- Integer

- Boolean

- Float

200

A program asks the user for their age. What stage in the IPO is this?

Input

200

x = 19

x += 4

What is the value of x?

23
200

What is the output?

for i in range(7):

   print(i)

0

1

2

3

4

5

6

200

How do you make comments in Python?

Place a Hashtag (#) at the beginning of the line

300

What is the difference between Int and Float?

Float can handle decimals; Int can only handle whole numbers.

300

A program calculates 10 + 5. What stage in the IPO is this?

Process

300

Which is a valid example of a variable name?

A. student_name

B. student name

C. 123student

D. student-name

A. student_name

(A variable cannot start with a number and cannot have spaces. Underscore becomes the exception.)

300

x = 0

for i in range(13):

    x=(x+1)%3

print(x)

3

300

Why do languages like Java use a semicolon to end the line?

To tell the compiler where a single instruction ends and the next begins.

400

What are the main 4 data types?

String, Bool, Int, Float

400

For a program that calculates the area of a rectangle, what could the inputs be?

The length and width of the rectangle.

400

What data type would "is_student = True" use?

Boolean.

400

x = 4

for i in range(5):

    x += i

print(x)

14

400

What is recursion?

Recursion is a programming technique where a function calls itself directly or indirectly to solve a problem. It must always contain a base case to stop the loop and prevent a stack overflow.

500

Why do we need specific data types in programming?

Data types help programs stay organized, avoid mistakes, and handle data correctly

500

For a calculator, identify the input, process, and output

Input: Numbers and an operation, such as 10 + 5

Process: Add the numbers

Output: 15

500

Why should variable names be meaningful?

easier to understand and maintain, especially in group work, and to avoid confusion with other variable names.

500

x = 4

for i in range(67):

    if x <= 4:

        x += 1

    else:

        x -= 1

print(x)

5

500

What is the difference between a compiler and an interpreter?

A compiler translates the entire source code into machine code all at once before execution (e.g., C, C++), creating a standalone executable file. 

An interpreter translates and executes the code line-by-line at runtime (e.g., JavaScript), which makes debugging faster but execution slower.